Add workflow to remove old untagged rocprofiler GHCR Docker Images (#1959)
* Add WIP workflow step to delete untagged images older than 1 week * Formatting fix for rocprofiler-systems-ghcr.yml * Move step to new workflow * Remove needs parameter from cleanup-rocprofiler-images * Remove expand-packages option * Expand cleanup for every OS * Revert spacing change to rocprofiler-systems-ghcr.yml * Turn off dry-run to do an initial clean * Switch dry-run to be only on PR * Added comment about schedule
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
name: rocprofiler GHCR Package Cleanup
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Runs daily at 6 AM UTC, 1 hour after the GHCR containers are updated
|
||||
- cron: 0 6 * * *
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/rocprofiler-ghcr-cleanup.yml'
|
||||
|
||||
jobs:
|
||||
cleanup-rocprofiler-images:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ 'ubuntu', 'rhel', 'opensuse', 'debian' ]
|
||||
|
||||
steps:
|
||||
- name: Clean up GHCR rocprofiler-${{ matrix.os }} Docker CI Images
|
||||
uses: dataaxiom/ghcr-cleanup-action@v1
|
||||
with:
|
||||
package: rocprofiler-${{ matrix.os }}
|
||||
older-than: 7 days
|
||||
dry-run: ${{ github.event_name == 'pull_request' }}
|
||||
Viittaa uudesa ongelmassa
Block a user