Sanity check if cloud-cleaner workflow is enabled

GitHub will automatically disable scheduled actions defined on
repositories which don't receive much activity. In particular such
scheduled jobs will be disabled after 60 days of repo inactivity.

This CI job sanity checks the current status and reports back to
every PR so we can manually re-enable cloud-cleaner if necessary.
This commit is contained in:
Alexander Todorov 2023-06-26 15:34:19 +03:00 committed by Alexander Todorov
parent d108849a59
commit 1757e5473d

View file

@ -228,3 +228,19 @@ jobs:
directory: processed-templates
config: templates/.kube-linter-config.yml
version: 0.3.0
cloud-cleaner-is-enabled:
name: "🧹 cloud-cleaner-is-enabled"
runs-on: ubuntu-latest
steps:
- name: Check if workflow is enabled
run: |
curl https://github.com/osbuild/cloud-cleaner/actions/workflows/run_ib.yml 2>/dev/null | grep -vz "This scheduled workflow is disabled" >/dev/null
- name: How to enable cloud-cleaner
if: failure()
run: |
echo "Cloud-cleaner is disabled"
echo "Go to https://github.com/osbuild/cloud-cleaner/actions/workflows/run_ib.yml and"
echo "https://github.com/osbuild/cloud-cleaner/actions/workflows/run_cloudx.yml and"
echo "manually enable it!"