Skip to content

Commit

Permalink
ci: fetch all refs
Browse files Browse the repository at this point in the history
  • Loading branch information
hknutsen committed Jan 2, 2025
1 parent 6f11d89 commit ffd8c88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit ffd8c88

Please sign in to comment.