From 644ce951dffdad435dbae4d04edac38828411365 Mon Sep 17 00:00:00 2001 From: Thomas Schaffter Date: Fri, 4 Oct 2024 10:24:13 -0700 Subject: [PATCH] fix(sage-monorepo): use GH token to push images to GHCR (#2882) --- .github/workflows/release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a8fbaf768e..482d989a21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,9 +6,10 @@ on: - 'agora/v*' - 'openchallenges/v*' +permissions: + packages: write + env: - DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} - DOCKER_USERNAME: ${{ github.actor }} PRODUCT: '' VERSION: '' @@ -41,5 +42,5 @@ jobs: run: | devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \ && export VERSION=${{ env.VERSION }} \ - && echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ghcr.io \ + && echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin \ && nx run-many --target=build-image --projects=${{ env.PRODUCT }}-* --configuration=ci"