From f03ac833a6ecd3c32413429896ca443ebaa7521e Mon Sep 17 00:00:00 2001 From: zhenlonghe Date: Fri, 24 Oct 2025 19:27:52 +0800 Subject: [PATCH] chore(workflow): update GHCR retention policy to use PAT instead of generated token - Removed the token generation step for GitHub App authentication. - Updated the deletion process to utilize a personal access token (PAT) for authentication. - Maintained the functionality to delete container versions older than 30 days while keeping the 5 most recent versions. --- .github/workflows/ghcr-retention.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ghcr-retention.yml b/.github/workflows/ghcr-retention.yml index 117f477d8..4d0e49d78 100644 --- a/.github/workflows/ghcr-retention.yml +++ b/.github/workflows/ghcr-retention.yml @@ -19,18 +19,11 @@ jobs: packages: write contents: read steps: - - name: Generate a token - id: generate-token - uses: actions/create-github-app-token@v1 - with: - app-id: ${{ secrets.GH_APP_ID }} - private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} - - name: Delete old container versions (30+ days) uses: snok/container-retention-policy@v3.0.1 with: account: user - token: ${{ steps.generate-token.outputs.token }} + token: ${{ secrets.PAT }} image-names: "*" cut-off: 30d keep-n-most-recent: 5