Skip to content

Commit

Permalink
Use default tag in case PR
Browse files Browse the repository at this point in the history
In PRs on forks the secrets are not exposed and we need to default to
something other than an empty string.

Signed-off-by: Nicolas Bock <[email protected]>
  • Loading branch information
nicolasbock committed May 6, 2024
1 parent 979326c commit cf8a002
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
env:
REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME || 'unpublished' }}

jobs:
build:
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
id: processor_meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/athena-processor
images: ${{ env.DOCKERHUB_USERNAME }}/athena-processor

- name: Build and publish Docker - processor
id: processor-build-and-push
Expand All @@ -75,7 +76,7 @@ jobs:
id: monitor_meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKERHUB_USERNAME }}/athena-monitor
images: ${{ env.DOCKERHUB_USERNAME }}/athena-monitor

- name: Build and publish Docker - monitor
id: monitor_build-and-push
Expand Down

0 comments on commit cf8a002

Please sign in to comment.