From a3eeecdf93da3a4375a9b90a8bc86460b1cf7258 Mon Sep 17 00:00:00 2001 From: Krishan <33421343+kfiven@users.noreply.github.com> Date: Wed, 17 Aug 2022 16:19:57 +0530 Subject: [PATCH] Push Docker image to ghcr registry --- .github/workflows/prod-deploy.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prod-deploy.yml b/.github/workflows/prod-deploy.yml index 7147c759..503d27e3 100644 --- a/.github/workflows/prod-deploy.yml +++ b/.github/workflows/prod-deploy.yml @@ -64,7 +64,7 @@ jobs: NETLIFY_DEPLOY_TO_PROD: true push-to-dockerhub: - name: Push Docker image to Docker Hub + name: Push Docker image to Docker Hub, ghcr runs-on: ubuntu-latest permissions: contents: read @@ -80,11 +80,18 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Login to the Container registry + uses: docker/login-action@v2.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GIT_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4.0.1 - with: - images: ajbura/cinny + with: | + ${{ secrets.DOCKER_USERNAME }}/cinny + ghcr.io/${{ github.repository }} - name: Build and push Docker image uses: docker/build-push-action@v3.1.1 with: