diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5c2384..81655fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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."