Skip to content

Commit

Permalink
chore: add clean unused github container image action job
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Feb 11, 2025
1 parent bb62387 commit 8d12167
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/clean_unused_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Clean Unused Docker Image

on:
schedule:
- cron: "0 0 * * *" # every day
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run'
required: true
type: boolean
default: false
cut_off:
description: 'Cut off date'
required: true
type: string
default: '90days'
jobs:
clean:
runs-on: ubuntu-latest
name: Delete old unused images
steps:
- name: clean tryzealot/zealot images
uses: snok/container-retention-policy@v3.0.0
env:
CUT_OFF: ${{ inputs.cut_off }}
with:
account: tryzealot
token: ${{ secrets.SECRET_API_TOKEN }}
image-names: "zealot"
tag-selection: untagged
cut-off: "${CUT_OFF:-90days}"
dry-run: ${{ inputs.dry_run }}
- name: clean tryzealot/codespace images
uses: snok/container-retention-policy@v3.0.0
env:
CUT_OFF: ${{ inputs.cut_off }}
with:
account: tryzealot
token: ${{ secrets.SECRET_API_TOKEN }}
image-names: "codespace"
tag-selection: untagged
cut-off: "${CUT_OFF:-90days}"
dry-run: ${{ inputs.dry_run }}
2 changes: 1 addition & 1 deletion .github/workflows/issue_translator.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'issue-translator'
name: Issue Translator
on:
issue_comment:
types: [created]
Expand Down

0 comments on commit 8d12167

Please # to comment.