Skip to content

Cleanup GitHub Container Registry #23

Cleanup GitHub Container Registry

Cleanup GitHub Container Registry #23

Workflow file for this run

name: Cleanup GitHub Container Registry
on:
schedule:
- cron: "0 0 * * *" # Midnight UTC daily
workflow_dispatch:
jobs:
clean:
name: Delete unused containers
runs-on: ubuntu-latest
steps:
- name: ServiceControl PRs/alphas
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol
filter-tags: pr-*, *-alpha.*
filter-include-untagged: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false
- name: ServiceControl untagged
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol
untagged-only: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false
- name: Audit PRs/alphas
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol-audit
filter-tags: pr-*, *-alpha.*
filter-include-untagged: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false
- name: Audit untagged
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol-audit
untagged-only: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false
- name: Monitoring PRs/alphas
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol-monitoring
filter-tags: pr-*, *-alpha.*
filter-include-untagged: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false
- name: Monitoring untagged
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol-monitoring
untagged-only: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false
- name: RavenDB PRs/alphas
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol-ravendb
filter-tags: pr-*, *-alpha.*
filter-include-untagged: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false
- name: RavenDB untagged
uses: snok/container-retention-policy@v2.2.1
with:
image-names: servicecontrol-ravendb
untagged-only: true
cut-off: 2 weeks ago UTC
timestamp-to-use: updated_at
account-type: org
org-name: particular
token: ${{ secrets.GITHUB_TOKEN }}
token-type: github-token
dry-run: false