Skip to content

Commit

Permalink
Don't push if there is no token or secret for dockerhub (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
nckturner authored Oct 26, 2023
1 parent 3cfdd8a commit b9e534a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ jobs:
else
TAG=$BRANCH
fi
if [[ -z "${{ secrets.DOCKERHUB_USER }}" || -z "${{ secrets.DOCKERHUB_TOKEN }}" ]]; then
docker buildx build \
-t $REPO:$TAG \
--platform=linux/amd64,linux/arm64 \
--progress plain \
.
exit 0
fi
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
docker buildx build \
Expand Down

0 comments on commit b9e534a

Please sign in to comment.