From b3ed198c993f71b2d91e85e811e869600bfe1207 Mon Sep 17 00:00:00 2001 From: TKS <32640296+bigsk1@users.noreply.github.com> Date: Wed, 3 Jul 2024 20:24:43 -0700 Subject: [PATCH] try again with access token --- .github/workflows/docker-publish.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 74d73e1..d4a3582 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -75,6 +75,7 @@ jobs: runs-on: ubuntu-latest needs: build-and-push-image permissions: + contents: read packages: write steps: - name: Install GitHub CLI @@ -84,6 +85,7 @@ jobs: env: PACKAGE_NAME: ${{ env.FRONTEND_IMAGE_NAME }} PACKAGE_OWNER: ${{ github.repository_owner }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh api --paginate -H "Accept: application/vnd.github+json" /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions > versions.json jq -r '.[].id' versions.json | tail -n +4 | xargs -I {} gh api --method DELETE /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions/{} --silent @@ -92,6 +94,7 @@ jobs: env: PACKAGE_NAME: ${{ env.BACKEND_IMAGE_NAME }} PACKAGE_OWNER: ${{ github.repository_owner }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | gh api --paginate -H "Accept: application/vnd.github+json" /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions > versions.json - jq -r '.[].id' versions.json | tail -n +4 | xargs -I {} gh api --method DELETE /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions/{} --silent + jq -r '.[].id' versions.json | tail -n +4 | xargs -I {} gh api --method DELETE /orgs/${PACKAGE_OWNER}/packages/container/${PACKAGE_NAME}/versions/{} --silent \ No newline at end of file