Skip to content

Commit

Permalink
CI/CD Strategy Matrix Switch to Env Context for Branch Variable
Browse files Browse the repository at this point in the history
  • Loading branch information
data-bomb committed Jan 28, 2025
1 parent 22a23ae commit 98861f3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/cicd-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ jobs:
shell: bash
run: echo "START_DIR=`pwd`" >> $GITHUB_ENV

- name: Print branch name
run: echo "$(echo ${GITHUB_REF#refs/heads/})"
- name: Save branch name
shell: bash
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: beta branch detected
if: ${{ github.ref == 'refs/heads/beta' }}
run: echo "Using beta branch"
Expand All @@ -176,13 +177,13 @@ jobs:
run: echo "Using main branch"
- uses: actions/checkout@v4
with:
ref: ${{ GITHUB_REF#refs/heads/ }}
ref: ${{ env.BRANCH_NAME }}
- name: Game References
uses: actions/checkout@v4
with:
repository: ${{ secrets.PRIV_R }}
token: ${{ secrets.FGAT_PRIV_R }}
ref: ${{ GITHUB_REF#refs/heads/ }}
ref: ${{ env.BRANCH_NAME }}
path: references

- name: Copy References
Expand Down

0 comments on commit 98861f3

Please sign in to comment.