Skip to content

Commit

Permalink
Ugly ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Jul 23, 2024
1 parent c0daaa3 commit 6f56923
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/docker-build-test-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,16 @@ jobs:
- name: Set jupyter token env
run: echo "JUPYTER_TOKEN=$(openssl rand -hex 32)" >> $GITHUB_ENV

- name: DEBUG docker images
run: docker images

- name: Run pytest for Chrome
run: pytest --driver Chrome tests_integration/
env:
QE_IMAGE: ${{ env.IMAGE }}@${{ steps.build-upload.outputs.imageid }}
# We'd like to identify the image by its unique digest, i.e ghcr.io/aiidalab/qe@sha256:<digest>
# but that sadly does not work when the image is loaded to Docker locally and not published on ghcr.io
# as is the case for PRs from forks. Hence this super-ugly ternary expression...
# For forks, we take the image as ghcr.io/aiidalab/qe:pr-XXX
# which is stored in the steps.meta.outputs.tags variable
QE_IMAGE: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork && steps.meta.outputs.tags || format({}@{},
env.IMAGE, steps.build-upload.outputs.imageid) }}

- name: Upload screenshots as artifacts
if: always()
Expand Down

0 comments on commit 6f56923

Please sign in to comment.