From acd30171f5b17a777695932e070d63de91297e57 Mon Sep 17 00:00:00 2001 From: eecavanna <134325062+eecavanna@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:52:31 -0700 Subject: [PATCH] Authenticate as workflow triggerer instead of as repo owner Docs: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context --- .github/workflows/build-and-release-to-spin.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-release-to-spin.yml b/.github/workflows/build-and-release-to-spin.yml index 5d2687ae..9ae97b8d 100644 --- a/.github/workflows/build-and-release-to-spin.yml +++ b/.github/workflows/build-and-release-to-spin.yml @@ -65,11 +65,12 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} # Reference: https://docs.docker.com/build/ci/github-actions/push-multi-registries/ + # Reference: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io - username: ${{ github.repository_owner }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push