From 91cdbd53e7612059824e9221bf3349caa6882c7f Mon Sep 17 00:00:00 2001 From: Prasanna S R Date: Thu, 14 Sep 2023 14:37:51 +0530 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 73a241e..25d97d9 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,6 +5,9 @@ on: branches: [ main ] release: types: [published] +env: + REGISTRY: ghcr.io + IMAGE_NAME: sunbird-rc/sunbird-rc-admin-portal jobs: push_to_registry: @@ -14,24 +17,21 @@ jobs: - name: Check out the repo uses: actions/checkout@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Log in to GHCR Docker Registry - uses: docker/login-action@v3 + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 with: - registry: ghcr.io - username: ${{ secrets.GHCR_USERNAME }} - password: ${{ secrets.GHCR_PASSWORD }} + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 with: - images: sunbird-rc/sunbird-rc-admin-portal + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: context: . push: true