From 1c5dd0358a099c502963132013b5995affe826db Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 29 Mar 2021 13:14:51 +0200 Subject: [PATCH 1/3] Use `GITHUB_TOKEN` for publishing images to GHCR --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ab56cb38..41b82928 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,9 +28,9 @@ jobs: . - name: Docker login - env: - CR_PAT: ${{ secrets.CR_PAT }} - run: docker login -u $GITHUB_ACTOR -p $CR_PAT ghcr.io + run: >- + echo "${{ secrets.GITHUB_TOKEN }}" + | docker login -u "${{ github.actor }}" --password-stdin - name: Push image to GitHub run: | From 42888b75c4dfdfb6f716399e546581f4ad79a69b Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 8 Apr 2021 21:35:53 -0700 Subject: [PATCH 2/3] Update workflow --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 41b82928..87b2945b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,9 +28,10 @@ jobs: . - name: Docker login - run: >- - echo "${{ secrets.GITHUB_TOKEN }}" - | docker login -u "${{ github.actor }}" --password-stdin + env: + DOCKER_USERNAME: ${{ github.actor }} + DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" ghcr.io - name: Push image to GitHub run: | From c5d23867f57ebf769cb6d0209fbb7bdab2b32f4a Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Thu, 8 Apr 2021 21:49:41 -0700 Subject: [PATCH 3/3] Update docker login --- .github/workflows/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 87b2945b..ec7dfa4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,10 +28,9 @@ jobs: . - name: Docker login - env: - DOCKER_USERNAME: ${{ github.actor }} - DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - run: docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" ghcr.io + run: >- + echo "${{ secrets.GITHUB_TOKEN }}" + | docker login -u "${{ github.actor }}" --password-stdin ghcr.io - name: Push image to GitHub run: |