-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "5 * * * *" # every hour | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
clean: | ||
runs-on: ubuntu-latest | ||
name: Delete old images | ||
steps: | ||
- name: Fetch multi-platform package version SHAs | ||
id: multi-arch-digests | ||
run: | | ||
package1=$(docker manifest inspect ghcr.io/pulibrary | jq -r '.manifests.[] | .digest' | paste -s -d ' ' -) | ||
echo "multi-arch-digests=$package1" >> $GITHUB_OUTPUT | ||
- uses: snok/[email protected] | ||
with: | ||
account: pulibrary | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
image-names: "dpul-collections" | ||
image-tags: "!main pr-* sha-*" # target any image that has a tag starting with the word test or dev | ||
cut-off: 2w | ||
keep-n-most-recent: 10 | ||
skip-shas: ${{ steps.multi-arch-digests.outputs.multi-arch-digests }} | ||
dry-run: true |