Files
metrics/.github/workflows/maintenance.yml
2021-11-12 20:32:48 -05:00

47 lines
1.5 KiB
YAML

name: Maintenance 🧰
on:
schedule:
- cron: "30 2 * * *"
workflow_dispatch:
jobs:
workflow_removal:
runs-on: ubuntu-latest
name: Workflow cleanup 🧹👷‍♂️
# Errors will probably be caused by excesses in API quota, so we can safely continue.
# Remaining workflows will be removed in the next scheduled run.
continue-on-error: true
steps:
- name: Clone repository
uses: actions/checkout@v2.3.4
- name: Run deletion script 🗑
run: ./delete_workflows.sh lowlighter/metrics
working-directory: ./.github/workflows/maintenance
env:
GITHUB_TOKEN: ${{ github.token }}
dangling_images_removal:
runs-on: ubuntu-latest
name: Cleanup dangling images from GHCR 🧹📦
# Errors will probably be caused by excesses in API quota, so we can safely continue.
# Remaining workflows will be removed in the next scheduled run.
continue-on-error: true
# Pay attention that the org name is not necessary here, as gh will automatically take the one from the logged in user.
strategy:
fail-fast: false
matrix:
container:
- 'metrics'
steps:
- name: Clone repository
uses: actions/checkout@v2.3.4
- name: Run deletion script 🗑
run: ./delete_ghcr_dangling_images.sh lowlighter ${{ matrix.container }}
working-directory: ./.github/workflows/maintenance
env:
GITHUB_TOKEN: ${{ secrets.GHCR_BOT_TOKEN }}