From d356c8bbeb05e5d07575c5c2f10aac04e138f481 Mon Sep 17 00:00:00 2001 From: BtbN Date: Mon, 11 Mar 2024 16:03:12 +0100 Subject: [PATCH] Use workflow token for package cleanup --- .github/workflows/build.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7451da2..88f0973 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,6 @@ on: env: DOCKER_BUILDKIT: 1 - HAVE_CLEANUP_PAT: ${{ secrets.CLEANUP_PAT != '' }} jobs: pre_check: @@ -94,11 +93,10 @@ jobs: ./download.sh ./util/clean_cache.sh - name: Cleanup - if: ${{ env.HAVE_CLEANUP_PAT == 'true' }} continue-on-error: true uses: BtbN/delete-untagged-ghcr-action@main with: - token: ${{ secrets.CLEANUP_PAT }} + token: ${{ github.token }} package_name: ${{ steps.imagename.outputs.rawname }} repository_owner: ${{ github.repository_owner }} repository: ${{ github.repository }} @@ -150,11 +148,10 @@ jobs: build-args: | GH_REPO=ghcr.io/${{ steps.imagename.outputs.gh_repo }} - name: Cleanup - if: ${{ env.HAVE_CLEANUP_PAT == 'true' }} continue-on-error: true uses: BtbN/delete-untagged-ghcr-action@main with: - token: ${{ secrets.CLEANUP_PAT }} + token: ${{ github.token }} package_name: ${{ steps.imagename.outputs.rawname }} repository_owner: ${{ github.repository_owner }} repository: ${{ github.repository }} @@ -216,11 +213,10 @@ jobs: cache-to: type=registry,mode=max,ref=${{ steps.imagename.outputs.name }}:cache cache-from: type=registry,ref=${{ steps.imagename.outputs.name }}:cache - name: Cleanup - if: ${{ env.HAVE_CLEANUP_PAT == 'true' }} continue-on-error: true uses: BtbN/delete-untagged-ghcr-action@main with: - token: ${{ secrets.CLEANUP_PAT }} + token: ${{ github.token }} package_name: ${{ steps.imagename.outputs.rawname }} repository_owner: ${{ github.repository_owner }} repository: ${{ github.repository }}