From b82f2dd934069f58090d63bd260b14d6ecf8413b Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 16 May 2026 10:44:40 +0900 Subject: [PATCH] CI: skip cache cleanup on pull requests Fork PR GITHUB_TOKENs cannot delete repository Actions caches, so run the cleanup only after trusted pushes to master. --- .github/workflows/build-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 01a589d3..b8f352c1 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -188,7 +188,7 @@ jobs: - name: Cleanup old caches uses: actions/github-script@v6 - if: always() + if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/master' }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: |