From 708522a7751df74a58de955f02de6fccd9066954 Mon Sep 17 00:00:00 2001 From: konstantinos Date: Sun, 18 Aug 2024 23:16:07 +0300 Subject: [PATCH] ci: fix workflow syntax --- .github/workflows/_gitops-merge-to-main.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/_gitops-merge-to-main.yml b/.github/workflows/_gitops-merge-to-main.yml index f0476d2..9a4e384 100644 --- a/.github/workflows/_gitops-merge-to-main.yml +++ b/.github/workflows/_gitops-merge-to-main.yml @@ -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 @@ -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 }}