Skip to content

Commit

Permalink
ci: fetch main branch before diff
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutsen committed Jan 2, 2025
1 parent 156069c commit b054201
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
id: build
shell: bash {0} # Required to check exit code
run: |
git diff --exit-code --merge-base "origin/$GITHUB_BASE_REF" "$BICEP_FILE_PATH"
git fetch origin "$GITHUB_BASE_REF"
git diff --exit-code --merge-base "$GITHUB_BASE_REF" "$BICEP_FILE_PATH"
exit_code="$?"
if [[ "$exit_code" == 0 ]]; then
echo "No changes made to Bicep file. Skipping build."
Expand Down

0 comments on commit b054201

Please sign in to comment.