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.
This commit is contained in:
Trevor Gross 2025-01-06 20:17:38 +00:00 committed by Trevor Gross
parent 2fff7dd979
commit a882639e7f

View file

@ -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