Skip to content

Commit

Permalink
gh workflow: modify test.yml to have a conditional & only extract doc…
Browse files Browse the repository at this point in the history
…ker tag if flag exists
  • Loading branch information
dandelany committed Aug 28, 2024
1 parent bef41ce commit 465f361
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,17 @@ jobs:
with:
node-version: 'lts/*'
cache: npm
- name: Extract backend docker tags from PR body
- name: Extract Aerie backend docker tag from PR body
# look in the PR body for eg. the string ___REQUIRES_AERIE_PR___=9999, extract the number & save to env var
# if backend PR is labeled correctly, it will publish a docker tag called 'pr-9999' to use in tests
if: ${{ contains($PR_BODY, '___REQUIRES_AERIE_PR___=') }}
run: |
echo "AERIE_IMAGE_TAG=pr-$(echo $PR_BODY | sed -n 's/.*___REQUIRES_AERIE_PR___=\"\([0-9]\+\)\".*/\1/p')" >> $GITHUB_ENV
- name: Extract Aerie gateway docker tag from PR body
# look in the PR body for eg. the string ___REQUIRES_AERIE_PR___=9999, extract the number & save to env var
# if backend PR is labeled correctly, it will publish a docker tag called 'pr-9999' to use in tests
if: ${{ contains($PR_BODY, '___REQUIRES_GATEWAY_PR___=') }}
run: |
echo "GATEWAY_IMAGE_TAG=pr-$(echo $PR_BODY | sed -n 's/.*___REQUIRES_GATEWAY_PR___=\"\([0-9]\+\)\".*/\1/p')" >> $GITHUB_ENV
- name: Start Services (Aerie)
run: |
Expand Down

0 comments on commit 465f361

Please sign in to comment.