Skip to content

Commit

Permalink
OPSEXP-2893 Add step which cleans the bakery-cache tags older than gi…
Browse files Browse the repository at this point in the history
…ven period
  • Loading branch information
pmacius committed Nov 14, 2024
1 parent 359e253 commit ca99bc3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/cleanup_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ jobs:
delete-tags: ${{ env.PR_TAGS }}
dry-run: false

- name: Remove ${{ env.CACHE_REPO }} tags older than ${{ env.PERIOD }} after PR is closed
uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066 # v1.0.13
if: github.event_name == 'pull_request'
env:
PERIOD: 2 weeks
with:
token: ${{ secrets.DELETE_PACKAGES_GITHUB_TOKEN }}
owner: ${{ env.ORG }}
repository: ${{ env.REPO }}
packages: ${{ env.CACHE_REPO }}
older-than: ${{ env.PERIOD }}
dry-run: false

- name: Remove images when requested
uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066 # v1.0.13
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
Expand Down

0 comments on commit ca99bc3

Please sign in to comment.