Skip to content

Commit

Permalink
ci(deploy): set tag override for smoke test from img build
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 23, 2023
1 parent 1576b18 commit e761bfe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
- name: Vars and Secrets to Env
env:
GIT_BRANCH: ${{ github.ref_name }}
TAG_OVERRIDE: ${{ needs.backend-build.outputs.image_tag }}
VARS_CONTEXT: ${{ toJson(vars) }}
SECRETS_CONTEXT: ${{ toJson(secrets) }}
run: |
Expand All @@ -81,6 +82,7 @@ jobs:
# Set all vars
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV
echo "TAG_OVERRIDE=${TAG_OVERRIDE}" >> $GITHUB_ENV
echo "${VARS_CONTEXT}" | to_envs >> $GITHUB_ENV
echo "${SECRETS_CONTEXT}" | to_envs >> $GITHUB_ENV
Expand All @@ -94,11 +96,12 @@ jobs:
echo "Substituing variables from .env.example --> .env"
./envsubst < .env.example > .env
echo "GIT_BRANCH=${GIT_BRANCH}" >> .env
echo "TAG_OVERRIDE=${TAG_OVERRIDE}" >> .env
- name: Backend smoke test
run: |
# Migrate db first, so api works
docker compose up -d migrations
docker compose up migrations --exit-code-from migrations
# Run without migrations (give exit code 0)
docker compose up -d \
Expand Down

0 comments on commit e761bfe

Please sign in to comment.