Skip to content

Commit

Permalink
ci: fix workflow syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
boromir674 committed Aug 18, 2024
1 parent 0c83fb2 commit 708522a
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/_gitops-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ on:
- auto-prod-*

jobs:
env:
# DRY Git Ops Branches
MAIN_BR: ${{ vars.GIT_MAIN_BRANCH || 'main' }}
RELEASE_BR: ${{ vars.GIT_RELEASE_BRANCH || 'release' }}
# Other important Git Branches
TEST_BR: ${{ vars.GIT_TEST_BRANCH || 'test' }}

# 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
Expand All @@ -40,21 +33,21 @@ jobs:
- name: Checkout 'test' branch
uses: actions/checkout@v4
with:
ref: ${{ env.TEST_BR }}
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 'release' into 'test' branch
run: |
git merge --no-edit ${{ env.RELEASE_BR }}
git push origin ${{ env.TEST_BR }}
git merge --no-edit ${{ vars.GIT_RELEASE_BRANCH || 'release' }}
git push origin ${{ vars.GIT_TEST_BRANCH || 'test' }}
auto_merge_pr_to_main:
uses: ./.github/workflows/go-auto-merge-main.yml
with:
main_branch: ${{ env.MAIN_BR }}
release_branch: ${{ env.RELEASE_BR }}
main_branch: ${{ vars.GIT_MAIN_BRANCH || 'main' }}
release_branch: ${{ vars.GIT_RELEASE_BRANCH || 'release' }}
commit_message: 'Automated Workflows'
secrets:
pat_token: ${{ secrets.GA_WORKFLOWS_CI_PR_RW_AND_ACTIONS_RW }}

0 comments on commit 708522a

Please sign in to comment.