File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 generate-dyff :
1414 runs-on : ubuntu-latest
1515 steps :
16+ # This checks out the merge of the PR branch and the base branch.
17+ # If you check this to be just the PR branch then the ref for the subsequent checkout
18+ # needs to be changed too or you end up with unexpected changes being shown.
1619 - name : Checkout PR
1720 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1821 with :
@@ -35,18 +38,12 @@ jobs:
3538 done
3639 echo "output_dir=$RUNNER_TEMP/new" | tee -a "$GITHUB_OUTPUT"
3740
38- # We want the most recent common ancestor between the target & PR branches rather than the target branch itself
39- # There could have been more commits to the target branch since the PR branch was created and we don't want to see
40- # those changes in the dyff, only what this branch is doing.
41- - name : Determine most recent common ancestor of target and PR branches
42- id : merge-base
43- run : |
44- echo "merge-base=$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})" | tee -a "$GITHUB_OUTPUT"
45-
41+ # https://github.com/orgs/community/discussions/59677 says that github.event.pull_request.base.sha
42+ # is only calculated on creation of the PR, so we reference the target branch by ref.
4643 - name : Checkout target
4744 uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
4845 with :
49- ref : ${{ steps.merge-base.outputs.merge- base }}
46+ ref : ${{ github.event.pull_request. base.ref }}
5047
5148 - name : Generate manifests for base
5249 run : |
Original file line number Diff line number Diff line change 1+ CI: change the comparision branch for the dyff job after the change to the source branch.
You can’t perform that action at this time.
0 commit comments