BeiDou Clean Untagged Image Workflow #4
This file contains hidden or 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: BeiDou Clean Untagged Image Workflow | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # 这个 cron 表达式表示每周一的 23:00 UTC 触发 | |
| - cron: '0 23 * * 1' | |
| env: | |
| GHCR_REGISTRY: ghcr.io | |
| BACKEND_IMAGE: beidou-server | |
| FRONTEND_IMAGE: beidou-ui | |
| concurrency: | |
| group: ${{github.workflow}} - ${{github.ref}} | |
| cancel-in-progress: true | |
| jobs: | |
| ghcr-cleanup-untag: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - uses: dataaxiom/ghcr-cleanup-action@v1 | |
| with: | |
| delete-untagged: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| packages: ${{ env.BACKEND_IMAGE }},${{ env.FRONTEND_IMAGE }} | |
| # dry-run: true |