name: Maintenance ๐Ÿงฐ on: schedule: - cron: "0 0 * * *" 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: ${{ secrets.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 ${{ matrix.container }} working-directory: ./.github/workflows/maintenance env: GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}