From f9fcb464ebc303cdf3467bf054c3acafcac7f3d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fern=C3=A1ndez?= Date: Mon, 26 Oct 2026 11:20:44 +0100 Subject: [PATCH] Fix keep-alive: re-enable workflow via API instead of pushing to protected master --- .github/workflows/keep-alive.yml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.github/workflows/keep-alive.yml b/.github/workflows/keep-alive.yml index 1c63fc8..65f8ce9 100644 --- a/.github/workflows/keep-alive.yml +++ b/.github/workflows/keep-alive.yml @@ -16,21 +16,8 @@ jobs: name: Keep workflow alive runs-on: ubuntu-latest permissions: - contents: write + actions: write steps: - - uses: actions/checkout@v6 - with: - ref: master - - - name: commit IF last commit is older than 50 days - run: | - datethen=$(date -d "-50 days" --utc +%s) - last_push=$(git log -1 --format=%ct) - if [ "$last_push" -le "$datethen" ]; then - git config user.name "Github Actions Keepalive Bot" - git config user.email "<>" - git commit -m "Empty commit to keep the github workflows alive" --allow-empty - git push origin master - else - echo "Last commit is recent enough, skipping keepalive commit." - fi \ No newline at end of file + # Re-enables the scheduled workflow via the GitHub API instead of pushing + # an empty commit to master (which is blocked by the branch ruleset). + - uses: liskin/gh-workflow-keepalive@f72ff1a1336129f29bf0166c0fd0ca6cf1bcb38c # v1 \ No newline at end of file