Skip to content

Commit

Permalink
Get secrets (Docker login credentials) in `build-quesma-docker-image.…
Browse files Browse the repository at this point in the history
…yml` (#868)

A hot fix after 0c220f9. After it was
merged, the reusable workflow ("child workflow") doesn't get the secrets
(docker credentials) by default, resulting in a job failure.

Fix the issue by specifying the needed secrets for the reusable
workflow.

The secrets are not required if `PUSH` doesn't happen and only the
`nightly-docker-build-and-push.yml` workflow actually passes those
secrets.
  • Loading branch information
avelanarius authored Oct 10, 2024
1 parent 0c220f9 commit 0dc60a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-quesma-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ on:
default: false
required: false
type: boolean
secrets:
DOCKER_USER:
required: false
DOCKER_PAT:
required: false

jobs:
build-quesma-docker-image:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/nightly-docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ jobs:
VERSION: ${{ inputs.VERSION || 'nightly' }} # when called from the main branch, `github.event.inputs.VERSION` doesn't use default value and is just empty
# Pushes to DockerHub only for `main` branch builds, unless set explicitly in the job input
PUSH: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || inputs.PUSH }}
secrets:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PAT: ${{ secrets.DOCKER_PAT }}

0 comments on commit 0dc60a1

Please sign in to comment.