Skip to content

Commit

Permalink
login to dockerhub before pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
hillalex committed Aug 2, 2024
1 parent 644cbc3 commit 7097e2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,11 @@ jobs:
- name: 🔥 Smoke test
run: ./scripts/smoke-test

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🚢 Push image
run: ./scripts/push
2 changes: 1 addition & 1 deletion scripts/push
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -ex
HERE=$(realpath "$(dirname $0)")
. $HERE/common

if [[ $GIT_BRANCH -eq "main" ]]; then
if [[ "$GIT_BRANCH" == "main" ]]; then
docker push $DOCKER_BRANCH_TAG
docker push $DOCKER_COMMIT_TAG
fi

0 comments on commit 7097e2b

Please sign in to comment.