Container Image Cleanup #6
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
name: Container Image Cleanup | |
on: | |
workflow_run: | |
workflows: ["Nightly Release"] | |
types: [completed] | |
workflow_dispatch: | |
jobs: | |
prune: | |
name: Prune Container Images | |
runs-on: ubuntu-latest | |
steps: | |
- uses: snok/container-retention-policy@v2 | |
with: | |
image-names: go-lambda-cleanup | |
cut-off: 1 day ago UTC | |
timestamp-to-use: created_at | |
account-type: personal | |
org-name: karl-cardenas-coding | |
keep-at-least: 1 | |
skip-tags: "v*" | |
filter-tags: "nightly" | |
filter-include-untagged: true | |
dry-run: true | |
token-type: github-token | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Actions Ntfy | |
if: failure() | |
run: | | |
curl \ | |
-H 'Authorization: ${{ secrets.NTFY_TOKEN }}' \ | |
-H "go-lambda-cleanup Nightly Release" \ | |
-H "X-Tags: warning" \ | |
-H "Markdown: yes" \ | |
-d 'The Nightly Release job failed for go-lambda-cleanup. Check out the GitHub Actions logs for more details.' \ | |
${{ secrets.NTFY_URL }} |