Skip to content

Commit

Permalink
[NEW] Automated Workflows v1.11.0 Release
Browse files Browse the repository at this point in the history
[GITOPS] - Merging 'release' in 'main' - Releasing into Production
  • Loading branch information
boromir674 authored Aug 18, 2024
2 parents 07a23cc + 67b5134 commit 25afebc
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ rw_gh_release:
- changed-files:
- any-glob-to-any-file:
- '.github/workflows/gh-release.yml'
rw_go_pr_to_boarding:
rw_gitops:
- any:
- changed-files:
- any-glob-to-any-file:
- '.github/workflows/internal/go-pr-to-boarding.yml'
- '.github/workflows/internal/go-*.yml'
rw_docs:
- any:
- changed-files:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/_gitops-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,31 @@ on:
- auto-prod-*

jobs:
# The cicd-test Suite references the test branch
# So, we push it to have the same state as, before the RC Tag Push
# which tag triggers CI Tests
put_test_branch_to_head:
runs-on: ubuntu-latest
steps:
# Checkout 'test' branch
- name: Checkout 'test' branch
uses: actions/checkout@v4
with:
ref: ${{ vars.GIT_TEST_BRANCH || 'test' }}
fetch-depth: 0
token: ${{ secrets.GA_WORKFLOWS_CI_PR_RW_AND_ACTIONS_RW }}

# Merge 'release' into 'test' branch
- name: Merge '${{ vars.GIT_RELEASE_BRANCH || 'release' }}' into 'test' branch
env:
release: ${{ vars.GIT_RELEASE_BRANCH || 'release' }}
run: |
git branch --track "${{ env.release }}" "origin/${{ env.release }}"
git merge --no-edit "${{ env.release }}"
git push origin ${{ vars.GIT_TEST_BRANCH || 'test' }}
auto_merge_pr_to_main:
needs: put_test_branch_to_head
uses: ./.github/workflows/go-auto-merge-main.yml
with:
main_branch: ${{ vars.GIT_MAIN_BRANCH || 'main' }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/go-auto-merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,26 @@ jobs:
env:
GH_TOKEN: ${{ secrets.pat_token }}

## Write Merge Commit Message to STEP SUMMARY ##
- run: echo "## Derived Merge Commit Message on `main`" >> $GITHUB_STEP_SUMMARY
- run: |
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "${{ env.CM_MSG }}" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
- run: echo "${{ env.CM_MSG }}" >> $GITHUB_STEP_SUMMARY
## Write Merge Commit Message in PR comments ##
- name: "Write Merge Commit Message in PR comments"
run: |
gh pr comment "${{ env.RELEASE_BR }}" --body \
"### PR will Auto Merge
**Merge Commit Message on main:**
\`\`\`
${{ env.CM_MSG }}
\`\`\`
"
env:
GH_TOKEN: ${{ secrets.pat_token }}

### Merge PR, when CI Pass + Human Review OK + Webhook Statuses Green + etc ###
- name: "Merge PR 'head': ${{ env.RELEASE_BR }} --> 'base': ${{ env.MAIN_BR }}"
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/).

## 1.11.0 (2024-09-18)

### Changes

#### Feature
- write release -> main PR comment mentioning auto-merge commit message

#### CI
- merge 'release' into 'test' before RC tag (and auto-merge PR main enable)
- update labeler so that it groups Git Ops feature changes under 'rw_gitops' tag


## 1.10.0 (2024-09-18)

### Changes
Expand Down

0 comments on commit 25afebc

Please sign in to comment.