diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index a2ff1275..66154f69 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -53,7 +53,7 @@ jobs: # Login against a Docker registry except on PR # https://github.com/docker/login-action - - name: Log into registry ${{ env.REGISTRY }} + - name: Log into GH registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' uses: docker/login-action@3da7dc6e2b31f99ef2cb9fb4c50fb0971e0d0139 with: @@ -61,13 +61,25 @@ 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@3da7dc6e2b31f99ef2cb9fb4c50fb0971e0d0139 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + # Extract metadata (tags, labels) for Docker # https://github.com/docker/metadata-action + # 1st image name is for GH package repo + # 2nd image name is for DockerHub image - name: Extract Docker metadata id: meta uses: docker/metadata-action@766400ca14a75010e7b2e3119aa0d5b46826e8c7 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + with: + images: | + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + obenozer412/${{ env.IMAGE_NAME }} + # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action