diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 90f86fe..df5d299 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -21,11 +21,19 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v5 with: - images: ${{ vars.DOCKER_ORG }}/php8 + images: | + ${{ vars.DOCKER_ORG }}/php8 + ghcr.io/${{ github.repository_owner }}/php8 tags: | type=ref,event=branch # set latest tag for default branch