Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Cleanup Image Tags

Cleanup Image Tags #3

Workflow file for this run

# This workflow runs on certain conditions to check for and potentially
# delete container images from the GHCR which no longer have an associated
# code branch.
# Requires a PAT with the correct scope set in the secrets.
#
# This workflow will not trigger runs on forked repos.
name: Cleanup Image Tags
on:
schedule:
- cron: '0 0 2 * *'
workflow_dispatch:
concurrency:
group: registry-tags-cleanup
cancel-in-progress: false
jobs:
cleanup-untagged-images:
name: Cleanup Untagged Images Tags for Tika
if: github.repository_owner == 'paperless-ngx'
runs-on: ubuntu-22.04
env:
# Requires a personal access token with the OAuth scope delete:packages
TOKEN: ${{ secrets.GHA_CONTAINER_DELETE_TOKEN }}
steps:
-
name: Clean untagged images
if: "${{ env.TOKEN != '' }}"
uses: stumpylog/image-cleaner-action/[email protected]
with:
token: "${{ env.TOKEN }}"
owner: "${{ github.repository_owner }}"
is_org: "true"
package_name: "tika"
do_delete: "true"