Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cleanup-registry): use new action #550

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/cleanup-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@ on:
- cron: '0 0 * * 1' # https://crontab.guru/#0_0_*_*_1
workflow_dispatch:

env:
IMAGE_NAMES: arora-api

jobs:
cleanup:
name: Cleanup
runs-on: ubuntu-latest
steps:
- name: Delete old versions
uses: snok/container-retention-policy@04c70fd030033036d69c0057e0d125bf25820544 # v2.1.2
- name: Delete untagged images
uses: actions/delete-package-versions@0d39a63126868f5eefaa47169615edd3c0f61e20 # v4.1.1
with:
image-names: ${{ env.IMAGE_NAMES }}
cut-off: 2 days ago UTC
account-type: personal
skip-tags: latest,staging
token: ${{ secrets.GH_PAT }}
package-name: ${{ github.event.repository.name }}
package-type: container
delete-only-untagged-versions: true