diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 772e1d5..ef4a7c9 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -14,6 +14,7 @@ on: env: REGISTRY: ghcr.io + DOCKER_REGISTRY: docker.io # github.repository as / IMAGE_NAME: ${{ github.repository }} @@ -40,6 +41,14 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + + - name: Log in to docker hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ env.DOCKER_REGISTRY }} + username: ${{ secrets.DOCKER_U }} + password: ${{ secrets.DOCKER_P }} - name: Extract metadata id: meta @@ -55,7 +64,9 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} + tags: | + ${{ steps.meta.outputs.tags }} + ${{ env.DOCKER_REGISTRY }}/${{ secrets.DOCKER_U }}/jmusicbot:latest labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max