Skip to content

Commit

Permalink
ci(pytest): set BACKEND_IMG_TAG in all if cases
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 20, 2023
1 parent 149c154 commit 2b3c540
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/r-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,24 @@ jobs:
# Cache backend build
image=${{ needs.backend-test-build.outputs.image_tag || inputs.image_tag }}
pull_and_package_image "$image"
echo "BACKEND_IMG_TAG=${image}" >> $GITHUB_ENV
- name: Load Cached Imgs
if: steps.image-cache.outputs.cache-hit == 'true'
if: ${{ steps.image-cache.outputs.cache-hit == 'true' }}
run: |
for image_tar in /tmp/images/*; do
docker image load --input $image_tar || true
done
# Set BACKEND_IMG_TAG if not set
image=$(docker image ls | grep backend)
image_tag="${image##*:}"
echo "Image Tag: $image_tag"
echo "BACKEND_IMG_TAG=${image_tag}" >> $GITHUB_ENV
- name: Vars and Secrets to Env
env:
API_TAG_OVERRIDE: ${{ needs.backend-test-build.outputs.image_tag || inputs.image_tag }}
API_TAG_OVERRIDE: ${BACKEND_IMG_TAG}
GIT_BRANCH: ${{ github.ref_name }}
VARS_CONTEXT: ${{ toJson(vars) }}
SECRETS_CONTEXT: ${{ toJson(secrets) }}
Expand Down

0 comments on commit 2b3c540

Please sign in to comment.