Skip to content

Commit a70b8b1

Browse files
authored
Remove default branch determination from workflow
1 parent 1faeb2e commit a70b8b1

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,6 @@ jobs:
235235
> infection.json5
236236
jq . infection.json5
237237
238-
- name: "Determine default branch"
239-
id: default-branch
240-
run: |
241-
BRANCH=$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
242-
delimiter="$(openssl rand -hex 16)"
243-
echo "name<<${delimiter}" >> "$GITHUB_OUTPUT"
244-
echo "$BRANCH" >> "$GITHUB_OUTPUT"
245-
echo "${delimiter}" >> "$GITHUB_OUTPUT"
246-
247238
- name: "Restore result cache"
248239
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
249240
with:
@@ -254,9 +245,9 @@ jobs:
254245
255246
- name: "Run infection"
256247
run: |
257-
git fetch --depth=1 origin ${{ steps.default-branch.outputs.name }}
248+
git fetch --depth=1 origin "$GITHUB_BASE_REF"
258249
infection \
259-
--git-diff-base=origin/${{ steps.default-branch.outputs.name }} \
250+
--git-diff-base=origin/"$GITHUB_BASE_REF" \
260251
--git-diff-lines \
261252
--ignore-msi-with-no-mutations \
262253
--min-msi=100 \

0 commit comments

Comments
 (0)