Skip to content

Commit b054201

Browse files
committed
ci: fetch main branch before diff
1 parent 156069c commit b054201

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
id: build
2323
shell: bash {0} # Required to check exit code
2424
run: |
25-
git diff --exit-code --merge-base "origin/$GITHUB_BASE_REF" "$BICEP_FILE_PATH"
25+
git fetch origin "$GITHUB_BASE_REF"
26+
git diff --exit-code --merge-base "$GITHUB_BASE_REF" "$BICEP_FILE_PATH"
2627
exit_code="$?"
2728
if [[ "$exit_code" == 0 ]]; then
2829
echo "No changes made to Bicep file. Skipping build."

0 commit comments

Comments
 (0)