Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Sep 30, 2024
1 parent 3aeb30e commit e7720e2
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/cleanup_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
types: [closed]
schedule:
- cron: '0 0 */14 * *' # Every 2 weeks
workflow_dispatch:

permissions:
packages: write

env:
KEEP_AMOUNT: 5 # Amount of latest images to keep after scheduled cleanup
ORG: Alfresco
REPO: alfresco-dockerfiles-bakery

Expand Down Expand Up @@ -38,22 +38,21 @@ jobs:
alfresco-ms-teams-service" >> $GITHUB_ENV
- name: Remove tag ${{format('pr-{0}', github.event.pull_request.number)}} after PR is closed
uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066
if: github.event.pull_request == 'closed'
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
owner: ${{ env.ORG }}
repository: ${{ env.REPO }}
packages: ${{ env.PACKAGE_NAMES }}
delete-tags: ${{format('pr-{0}', github.event.pull_request.number)}}
dry-run: true
- name: Remove untaged images and keep latest ${{ env.KEEP_AMOUNT }} images
- name: Remove untaged images
uses: dataaxiom/ghcr-cleanup-action@98b4022383d6ddb70ccbf6a378b4d8c67a60f066
if: github.event_name == 'schedule'
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
owner: ${{ env.ORG }}
repository: ${{ env.REPO }}
packages: ${{ env.PACKAGE_NAMES }}
keep-n-tagged: ${{ env.KEEP_AMOUNT }}
delete-untagged: true
dry-run: true

0 comments on commit e7720e2

Please sign in to comment.