diff --git a/.github/workflows/__cleanup.yml b/.github/workflows/__cleanup.yml index 220374f0..1e5cd7ae 100644 --- a/.github/workflows/__cleanup.yml +++ b/.github/workflows/__cleanup.yml @@ -5,7 +5,15 @@ name: Cleanup artifacts permissions: {} on: + schedule: + - cron: '30 7 * * 0' # every Sunday at 07:30 UTC workflow_dispatch: + inputs: + dry_run: + description: Report artifacts without deleting them + required: false + type: boolean + default: true concurrency: group: cleanup-artifacts @@ -19,7 +27,7 @@ jobs: permissions: contents: read with: - dry_run: true + dry_run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }} secrets: CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} @@ -33,7 +41,7 @@ jobs: packages: write with: docker_hub_username: ${{ vars.DOCKER_HUB_USERNAME }} - dry_run: true + dry_run: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }} gh_bot_name: ${{ vars.GH_BOT_NAME }} max_deletions: 1000 secrets: