Skip to content

Commit

Permalink
try evaluate RELEASE_BRANCH_NAME at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Feb 10, 2025
1 parent d09823e commit 57fbf2c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ env:
CODEARTIFACT_USERNAME: ${{ secrets.CODEARTIFACT_USERNAME }}
ECR_NEO4J_DOCKER_URL: ${{ secrets.ECR_NEO4J_DOCKER_URL }}
BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
RELEASE_BRANCH_NAME: $BRANCH_NAME =~ ^\d{4}\.(0[1-9]|1[0-2])\.\d+$ || $BRANCH_NAME =~ ^5.[0-9]+$

jobs:
code-ql:
Expand All @@ -25,6 +24,13 @@ jobs:
matrix:
language: [ 'java', 'javascript' ]
steps:
- name: Set RELEASE_BRANCH_NAME based on branch name
run: |
if [[ "$BRANCH_NAME" =~ [0-9]{4}\.(0[1-9]|1[0-2]) || "$BRANCH_NAME" =~ ^5\.[0-9]+$ ]]; then
echo "RELEASE_BRANCH_NAME=true" >> $GITHUB_ENV
else
echo "RELEASE_BRANCH_NAME=false" >> $GITHUB_ENV
fi
- name: Set CODEARTIFACT_DOWNLOAD_URL based on BRANCH_NAME
run: |
if [[ $RELEASE_BRANCH_NAME ]]; then
Expand Down Expand Up @@ -104,6 +110,13 @@ jobs:
project: [ 'extended', 'extended-it' ]
runs-on: ubuntu-latest
steps:
- name: Set RELEASE_BRANCH_NAME based on branch name
run: |
if [[ "$BRANCH_NAME" =~ [0-9]{4}\.(0[1-9]|1[0-2]) || "$BRANCH_NAME" =~ ^5\.[0-9]+$ ]]; then
echo "RELEASE_BRANCH_NAME=true" >> $GITHUB_ENV
else
echo "RELEASE_BRANCH_NAME=false" >> $GITHUB_ENV
fi
- name: Configure AWS CLI
uses: aws-actions/configure-aws-credentials@v2
with:
Expand Down

0 comments on commit 57fbf2c

Please sign in to comment.