Cleanup and Maintainance #179
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: "Cleanup and Maintainance" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "16 23 * * 1" | |
jobs: | |
dockercleanup: | |
runs-on: ubuntu-latest | |
name: "Pruning Untagged Images" | |
# using https://github.com/marketplace/actions/ghcr-pruning | |
steps: | |
- name: "brmo-bgt-loader older than 1 week" | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-bgt-loader | |
dry-run: false | |
keep-younger-than: 7 | |
keep-last: 1 | |
prune-untagged: true | |
- name: "brmo-service older than 1 week" | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-service | |
dry-run: false | |
keep-younger-than: 7 | |
keep-last: 1 | |
prune-untagged: true | |
- name: "brmo-service-db older than 1 week" | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-service-db | |
dry-run: false | |
keep-younger-than: 7 | |
keep-last: 1 | |
prune-untagged: true | |
- name: "brmo-bag2-loader older than 1 week" | |
continue-on-error: true | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-bag2-loader | |
dry-run: false | |
keep-younger-than: 7 | |
keep-last: 1 | |
prune-untagged: true | |
- name: "brmo-bgt-loader older than 4 weeks" | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-bgt-loader | |
dry-run: false | |
keep-younger-than: 28 | |
keep-last: 0 | |
prune-untagged: true | |
- name: "brmo-service older than 4 weeks" | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-service | |
dry-run: false | |
keep-younger-than: 28 | |
keep-last: 0 | |
prune-untagged: true | |
- name: "brmo-service-db older than 4 weeks" | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-service-db | |
dry-run: false | |
keep-younger-than: 28 | |
keep-last: 0 | |
prune-untagged: true | |
- name: "brmo-bag2-loader older than 4 weeks" | |
continue-on-error: true | |
uses: vlaurin/[email protected] | |
with: | |
token: ${{ secrets.GHCR_CLEANUP_PAT }} | |
organization: B3Partners | |
container: brmo-bag2-loader | |
dry-run: false | |
keep-younger-than: 28 | |
keep-last: 0 | |
prune-untagged: true | |
otherworkflows: | |
runs-on: ubuntu-latest | |
name: "Cleanup all old workflow runs" | |
steps: | |
- name: Delete workflow runs | |
uses: boredland/[email protected] | |
with: | |
days-old: 60 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
stale: | |
runs-on: ubuntu-latest | |
name: "Close Stale PRs" | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/stale@v9 | |
with: | |
days-before-stale: 60 | |
days-before-close: 14 | |
stale-pr-label: 'stale' | |
exempt-pr-labels: 'dependency update' | |
stale-pr-message: 'Dit PR is automatisch gemarkeerd als "stale" omdat er niet meer aan gewerkt wordt. Als er niets meer mee gebeurd zal deze PR automatisch worden gesloten.' |