From 1bbd738d3a70041f3e13d60dd9157b3e22c42a0e Mon Sep 17 00:00:00 2001 From: Praveen Date: Mon, 11 Nov 2024 10:21:58 +0530 Subject: [PATCH 1/2] Pushing the image to GHCR.io --- .github/workflows/build-and-publish.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 4237f6f..928f8e2 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -17,11 +17,20 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Login to GitHub Container Registry + 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 }}/${{ github.event.repository.name }} + images: | + ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }} + ghcr.io/${{ github.repository }} tags: | type=ref,event=branch type=ref,event=tag From ef44f8f2d3cc55a0338adbf59077c3eabb5b2f2d Mon Sep 17 00:00:00 2001 From: Praveen Date: Mon, 11 Nov 2024 11:49:25 +0530 Subject: [PATCH 2/2] Update .github/workflows/build-and-publish.yml Co-authored-by: briskt <3172830+briskt@users.noreply.github.com> --- .github/workflows/build-and-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 928f8e2..c21ccbe 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -20,9 +20,9 @@ jobs: - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta