Skip to content

Commit ed88337

Browse files
authored
Inject default values to container image name to avoid CI failure in from-fork PRs (#108)
inject default values so PR from forks will test building an image
1 parent 8935a0e commit ed88337

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: .github/workflows/docker-publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
uses: docker/metadata-action@906ecf0fc0a80f9110f79d9e6c04b1080f4a2621
7676
with:
7777
images: |
78-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
78+
${{ env.REGISTRY != '' && env.REGISTRY || 'ghcr.io' }}/${{ env.IMAGE_NAME != '' && env.IMAGE_NAME || 'commercetools/telefonistka'}}
7979
8080
8181
# Build and push Docker image with Buildx (don't push on PR)
@@ -100,7 +100,7 @@ jobs:
100100
uses: docker/metadata-action@906ecf0fc0a80f9110f79d9e6c04b1080f4a2621
101101
with:
102102
images: |
103-
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
103+
${{ env.REGISTRY != '' && env.REGISTRY || 'ghcr.io' }}/${{ env.IMAGE_NAME != '' && env.IMAGE_NAME || 'commercetools/telefonistka'}}
104104
flavor: prefix=alpine-,onlatest=true
105105

106106
# Build and push Docker image with Buildx (don't push on PR)

0 commit comments

Comments
 (0)