Skip to content

ghcr actions

ghcr actions #416

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: ghcr actions
on:
schedule:
- cron: '21 21 * * *'
jobs:
clean-ghcr:
name: Delete old unused container images
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Delete 'PR' containers older than a week
uses: snok/[email protected]
with:
image-names: sda-doa
image-tags: "PR* sha-* !latest"
cut-off: 1w
account: ${{ github.repository_owner }}
keep-n-most-recent: 1
token: ${{ secrets.GHRC_CNTNR_CLNUP }}
- name: Delete all containers older than three months, using a wildcard
uses: snok/[email protected]
with:
image-names: sda-doa
image-tags: "v* !latest"
cut-off: 3months
account: ${{ github.repository_owner }}
keep-n-most-recent: 2
token: ${{ secrets.GHRC_CNTNR_CLNUP }}