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

Commit

Permalink
Configures untagged Docker image cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpylog committed Feb 6, 2024
1 parent 2c8a8e6 commit 6957afc
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/cleaning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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"

0 comments on commit 6957afc

Please sign in to comment.