diff --git a/.github/workflows/docker-publish-on-comment.yml b/.github/workflows/docker-publish-on-comment.yml index 70e2d5fe..52c4c418 100644 --- a/.github/workflows/docker-publish-on-comment.yml +++ b/.github/workflows/docker-publish-on-comment.yml @@ -58,6 +58,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Log into Docker Hub registry ${{ env.REGISTRY }} + uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action @@ -70,6 +75,7 @@ jobs: context: git images: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + odedbenozer/telefonistka tags: | type=ref,event=branch type=ref,event=pr diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 956c141c..853797a5 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -61,6 +61,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Log into Docker Hub registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action @@ -72,6 +78,7 @@ jobs: with: images: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + odedbenozer/telefonistka # Build and push Docker image with Buildx (don't push on PR)