Skip to content

Commit

Permalink
Fix issue preventing PR container builds
Browse files Browse the repository at this point in the history
Checking out the PR fork repo could sometimes cause the "git diff" command to return an invalid revision range, like in [1].
This might happen if the fork repo is outdated.

[1] https://github.com/redhat-developer/rhdh-operator/actions/runs/12417737622/job/34715972414?pr=582
  • Loading branch information
rm3l committed Dec 20, 2024
1 parent 8165fba commit 01b43b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr-bundle-diff-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{ github.event.pull_request.head.ref }}
ref: "${{ github.event.pull_request.merge_commit_sha }}"

- name: Setup Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pr-container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: "${{ github.event.pull_request.merge_commit_sha }}"

# check changes in this commit for regex include and exclude matches; pipe to an env var
- name: Check for changes to build
Expand Down

0 comments on commit 01b43b2

Please sign in to comment.