Skip to content

Commit

Permalink
Merge pull request #9447 from department-of-veterans-affairs/chanel-9…
Browse files Browse the repository at this point in the history
…431-make-release-pr-branch-unique

Automation/9431-chanel-automation-make-release-pr-branch-unique
  • Loading branch information
IsraelleHub authored Sep 4, 2024
2 parents 4066830 + 2dbf76b commit 919f612
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/approve_command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,12 @@ jobs:
run: |
gh issue close ${{ github.event.client_payload.github.payload.issue.number }}
gh issue comment ${{ github.event.client_payload.github.payload.issue.number }} -b "Issue Successfully Closed"
start_slack_thread:
name: Start Slack thread
if: ${{ failure() }}
needs: [indicate_start, comment_complete]
uses: ./.github/workflows/start_slack_thread.yml
secrets: inherit
with:
channel_name: va-mobile-build-alerts
message: 'The `/approve` command for release ${{ github.event.client_payload.slash_command.args.unnamed.arg1 }} has failed. See <${{ github.server_url }}/${{ github.repository }} has failed. See <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results.'
21 changes: 7 additions & 14 deletions .github/workflows/release_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,24 @@ jobs:
run: gh auth login --with-token < token.txt
- name: 'Create PR to merge changes back to develop'
run: |
MERGE_TO_DEV_BRANCH=release-${{inputs.version}}-to-develop
git config --global user.name 'VA Automation Bot'
git config --global user.email '[email protected]'
git checkout release/${{inputs.version}}
git checkout -b dev-to-release
git push -u origin dev-to-release
git checkout -b $MERGE_TO_DEV_BRANCH
git push -u origin $MERGE_TO_DEV_BRANCH
echo "DEV_PR=$(gh pr create -B develop -t "Merge ${{inputs.version}} to develop" -b "PR to merge ${{inputs.version}} release branch changes into develop")" >> $GITHUB_ENV
- name: 'Merge changes to main and tag for release build'
run: |
MERGE_TO_MAIN_BRANCH=merge-${{inputs.version}}-to-main
git config --global user.name 'VA Automation Bot'
git config --global user.email '[email protected]'
git checkout main
git checkout release/${{inputs.version}}
git checkout -b merge-to-main
git checkout -b $MERGE_TO_MAIN_BRANCH
git merge -s ours main -m "merge main changes"
git checkout main
git merge merge-to-main --squash
git merge $MERGE_TO_MAIN_BRANCH --squash
git commit -m ${{inputs.version}}
git push
git tag -a ${{inputs.version}} -m ${{inputs.version}}
Expand All @@ -66,13 +68,4 @@ jobs:
id: urls
run: |
echo "::set-output name=dev::${{env.DEV_PR}}"
echo "::set-output name=release::${{env.RELEASE_HASH}}"
start_slack_thread:
name: Start Slack thread
if: ${{ failure() }}
needs: create_prs
uses: ./.github/workflows/start_slack_thread.yml
secrets: inherit
with:
channel_name: va-mobile-build-alerts
message: 'The `/approve` command for release ${{inputs.version}} has failed. See <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow run> for results.'
echo "::set-output name=release::${{env.RELEASE_HASH}}"

0 comments on commit 919f612

Please sign in to comment.