diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 820d491..d5076e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,14 +16,14 @@ jobs: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: - ref: ${{ github.head_ref }} # Required to push commit to PR + fetch-depth: 0 # Required to show diff between PR source and target branches + ref: ${{ github.head_ref }} # Required to push commit to PR source branch - name: Build Bicep file id: build shell: bash {0} # Required to check exit code run: | - git fetch origin "$GITHUB_BASE_REF" - git diff --exit-code --merge-base "origin/$GITHUB_BASE_REF" "$BICEP_FILE_PATH" + 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."