-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add clean unused github container image action job
- Loading branch information
Showing
2 changed files
with
45 additions
and
1 deletion.
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,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 }} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 'issue-translator' | ||
name: Issue Translator | ||
on: | ||
issue_comment: | ||
types: [created] | ||
|