From a882639e7f76d6f599840fa23e691c4dc30cc5f2 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Mon, 6 Jan 2025 20:17:38 +0000 Subject: [PATCH] ci: Only update the github ref for pull requests On master, this fetch fails with: fatal: refusing to fetch into branch 'refs/heads/master' checked out at '/home/runner/work/libm/libm' Just skip the command when this shouldn't be needed. --- library/compiler-builtins/libm/.github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/library/compiler-builtins/libm/.github/workflows/main.yml b/library/compiler-builtins/libm/.github/workflows/main.yml index 1b2fd12ba87e..320800f2ea7e 100644 --- a/library/compiler-builtins/libm/.github/workflows/main.yml +++ b/library/compiler-builtins/libm/.github/workflows/main.yml @@ -198,6 +198,7 @@ jobs: fetch-depth: 100 - name: Fetch pull request ref run: git fetch origin "$GITHUB_REF:$GITHUB_REF" + if: github.event_name == 'pull_request' - run: python3 ci/calculate-exhaustive-matrix.py >> "$GITHUB_OUTPUT" id: script