Merge pull request #1140 from paperless-ngx/chore-image-tag-cleanups

This commit is contained in:
shamoon
2022-07-07 06:50:47 -07:00
committed by GitHub
3 changed files with 333 additions and 0 deletions

48
.github/workflows/cleanup-tags.yml vendored Normal file
View File

@@ -0,0 +1,48 @@
name: Cleanup Image Tags
on:
schedule:
- cron: '0 0 * * SAT'
delete:
pull_request:
types:
- closed
push:
paths:
- ".github/workflows/cleanup-tags.yml"
- ".github/scripts/cleanup-tags.py"
- ".github/scripts/common.py"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
cleanup:
name: Cleanup Image Tags
runs-on: ubuntu-20.04
permissions:
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Github Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.9"
-
name: Install requests
run: |
python -m pip install requests
-
name: Cleanup feature tags
run: |
python ${GITHUB_WORKSPACE}/.github/scripts/cleanup-tags.py --loglevel info