boxes/.forgejo/workflows/clean-containers.yml
aleidk ed2967153d
Some checks failed
Clean container registry / clean (devbox) (push) Failing after 2s
chore: add cleaning workflow ci
2024-11-05 16:35:40 -03:00

24 lines
623 B
YAML

name: Clean container registry
on:
push:
workflow_dispatch:
jobs:
clean:
runs-on: docker
strategy:
matrix:
box:
- "devbox"
steps:
- name: Get timestamp
id: timestamp
run: |
echo "year=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
echo "current_month=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
- uses: actions/delete-package-versions@v5
with:
package-name: ${{matrix.box}}
package-type: 'container'
min-version-to-keep: 3
# ignore latest and this month uploads
ignore-versions: '^(?:latest)$'