[Dispatch] Master To Develop #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[Dispatch] Master To Develop" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'enter version(x.y.z)' | |
required: true | |
default: '2.0.0' | |
env: | |
VERSION: ${{ github.event.inputs.version }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
REF_BRANCH: "master" | |
jobs: | |
merge_to_develop: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{env.REF_BRANCH}} | |
fetch-depth: 0 | |
fetch-tags: false | |
submodules: true | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Fetch develop branch | |
run: | | |
git checkout -b develop origin/develop | |
- name: Configure git | |
run: | | |
git log -n 10 --oneline | |
git branch | |
git config --global user.email "${{ vars.GIT_EMAIL }}" | |
git config --global user.name "${{ vars.GIT_USERNAME }}" | |
- name: Import GPG key | |
id: import-gpg | |
uses: crazy-max/ghaction-import-gpg@v6.2.0 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Merge master into develop | |
run: | | |
git merge --no-ff master -m "chore: merge master into develop after ${{ env.VERSION }} version tagging" | |
- name: Push changes to develop using GitHub push action | |
uses: ad-m/github-push-action@v0.6.0 | |
with: | |
branch: develop | |
github_token: ${{ secrets.PAT_TOKEN }} | |
- name: Notice when job fails | |
if: failure() | |
uses: 8398a7/action-slack@v3.15.0 | |
with: | |
status: ${{job.status}} | |
fields: repo,workflow,job | |
author_name: Github Action Slack |