From 96d5f521c9ae3696117ad38e3a69b79e179f51c9 Mon Sep 17 00:00:00 2001 From: Andrey Kaipov Date: Wed, 3 Jan 2024 13:45:07 -0500 Subject: [PATCH 1/2] ? --- .github/workflows/image-retention-policy.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/image-retention-policy.yml b/.github/workflows/image-retention-policy.yml index 7ee4c86f..ea79cbb8 100644 --- a/.github/workflows/image-retention-policy.yml +++ b/.github/workflows/image-retention-policy.yml @@ -15,10 +15,12 @@ jobs: private_key: ${{ secrets.CATHY_CLOUD_APP_PRIVATE_KEY }} - name: Delete old images - uses: snok/container-retention-policy@main + uses: snok/container-retention-policy@v2 with: - account-type: personal + account-type: org + org-name: andreykaipov token: ${{ steps.generate-token.outputs.token }} + token-type: github-token image-names: ${{ github.event.repository.name }} cut-off: one month ago EST untagged-only: true From bae7676352ca952328c9a13e7f54ae0132e98452 Mon Sep 17 00:00:00 2001 From: Andrey Kaipov Date: Wed, 3 Jan 2024 16:36:28 -0500 Subject: [PATCH 2/2] ci: use default github.token again --- .github/workflows/image-retention-policy.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/image-retention-policy.yml b/.github/workflows/image-retention-policy.yml index ea79cbb8..96a3b740 100644 --- a/.github/workflows/image-retention-policy.yml +++ b/.github/workflows/image-retention-policy.yml @@ -8,19 +8,12 @@ jobs: clean-ghcr: runs-on: ubuntu-latest steps: - - uses: tibdex/github-app-token@v2 - id: generate-token - with: - app_id: ${{ secrets.CATHY_CLOUD_APP_ID }} - private_key: ${{ secrets.CATHY_CLOUD_APP_PRIVATE_KEY }} - - name: Delete old images uses: snok/container-retention-policy@v2 with: - account-type: org - org-name: andreykaipov - token: ${{ steps.generate-token.outputs.token }} + account-type: personal token-type: github-token + token: ${{ github.token }} image-names: ${{ github.event.repository.name }} cut-off: one month ago EST untagged-only: true