From 992615a42fe787ce49da6d77cee44e9d1d744033 Mon Sep 17 00:00:00 2001 From: wirehack7 Date: Thu, 1 May 2025 12:44:13 +0200 Subject: [PATCH] added cleanup --- .gitea/workflows/cleanup_registry.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .gitea/workflows/cleanup_registry.yaml diff --git a/.gitea/workflows/cleanup_registry.yaml b/.gitea/workflows/cleanup_registry.yaml new file mode 100644 index 0000000..4719169 --- /dev/null +++ b/.gitea/workflows/cleanup_registry.yaml @@ -0,0 +1,24 @@ +name: Cleanup old Docker images + +on: + schedule: + - cron: '0 6 * * *' # Täglich um 6 Uhr + workflow_dispatch: + +jobs: + cleanup: + runs-on: ubuntu-latest + + steps: + - name: Install crane (OCI Registry tool) + run: | + curl -LO https://github.com/google/go-containerregistry/releases/latest/download/go-containerregistry_Linux_x86_64.tar.gz + tar -xzf go-containerregistry_Linux_x86_64.tar.gz + chmod +x crane + sudo mv crane /usr/local/bin/ + + - name: List Docker tags + run: | + crane ls git.0day.agency/${{ secrets.REGISTRY_USERNAME }}/novelai-discord-bot \ + --username ${{ secrets.REGISTRY_USERNAME }} \ + --password ${{ secrets.REGISTRY_TOKEN }} \ No newline at end of file