From c19c518897ab5e781e80c7236302532aeafd4dce Mon Sep 17 00:00:00 2001 From: Oded Ben Ozer Date: Wed, 3 Apr 2024 14:01:41 +0200 Subject: [PATCH] reenable publishing dockerhub images (#159) * Revert "Disable Publishing of images to DockerHub until token issue is addressed (#158)" This reverts commit 0b0b2664ba607a3de30af4031b39c24cf0e63ec6. * Move to personal GH org until the WayfairOSS thing is sorted out --- .github/workflows/docker-publish-on-comment.yml | 6 ++++++ .github/workflows/docker-publish.yml | 7 +++++++ 2 files changed, 13 insertions(+) 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)