Skip to content

Commit ae9deae

Browse files
committed
fix: do not early-exit if there is no dockerhub-secret
1 parent e42632b commit ae9deae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/oci-ocm.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,7 @@ jobs:
345345
run: |
346346
set -euo pipefail
347347
# cannot check in if-clause above, as `secrets` ctx is not accessible there
348-
if [ -z '${{ secrets.DOCKERHUB_RO_AUTH }}' ]; then
349-
exit 0
350-
fi
348+
if [ -n '${{ secrets.DOCKERHUB_RO_AUTH }}' ]; then
351349
cat <<EOF >> /tmp/config.json
352350
{
353351
"registry-1.docker.io": {
@@ -364,6 +362,9 @@ jobs:
364362
}
365363
}
366364
EOF
365+
else
366+
echo "{}" >> /tmp/config.json
367+
fi
367368
echo 'extra-auths<<EOF' >> "${GITHUB_OUTPUT}"
368369
if ${{ secrets.auth-token != '' }}; then
369370
target_host=$(echo '${{ matrix.args.image-reference }}' | cut -d/ -f1)

0 commit comments

Comments
 (0)