From aa45d1823cabf9defb08a13ffe6a3e3f88810f63 Mon Sep 17 00:00:00 2001 From: Serhii Koropets Date: Mon, 30 Sep 2024 12:54:55 +0300 Subject: [PATCH] Correct login to ghcr.io --- .github/workflows/ci.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4687eab..932771f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -179,6 +179,8 @@ jobs: name: Push docker images needs: build-docker runs-on: ubuntu-latest + permissions: + packages: write env: IMAGE_LICENSE: AGPL-3.0 IMAGE_HOME_URL: https://github.com/equinor/gordo-controller @@ -203,21 +205,13 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - - name: Login to production CR - uses: docker/login-action@v2 - if: ${{ steps.prep.outputs.login_prod_cr }} - with: - registry: ${{ env.DOCKER_PROD_REGISTRY }} - username: ${{ secrets.DOCKER_PROD_USERNAME }} - password: ${{ secrets.DOCKER_PROD_TOKEN }} - - name: Login to CR uses: docker/login-action@v2 if: ${{ steps.prep.outputs.login_cr }} with: registry: ${{ env.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_GITHUB_USER }} - password: ${{ secrets.DOCKER_GITHUB_PASSWORD }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v3