Skip to content

cleanup

cleanup #37

Workflow file for this run

name: cleanup
on:
# Weekly cleanup
schedule:
- cron: "30 4 * * 3"
# Manual cleanup
workflow_dispatch:
jobs:
ghcr:
runs-on: ubuntu-latest
steps:
- name: Get repository name
run: |
REPOSITORY_NAME="${{ github.repository }}"
REPOSITORY_NAME="${REPOSITORY_NAME##*/}"
echo "Repository name is: $REPOSITORY_NAME"
echo "REPOSITORY_NAME=$REPOSITORY_NAME" >> $GITHUB_ENV
- name: Delete untagged Docker images
uses: Chizkiyahu/delete-untagged-ghcr-action@v4
with:
token: ${{ secrets.GHCR_ACCESS_TOKEN }}
owner_type: user
package_name: ${{ env.REPOSITORY_NAME }}
untagged_only: true