File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,23 @@ jobs:
24
24
if : github.repository == 'hibernate/hibernate-validator' && github.event.workflow_run.conclusion != 'cancelled'
25
25
runs-on : ubuntu-latest
26
26
steps :
27
+ # Different branches might have different versions of Develocity, and we want to make sure
28
+ # that we publish with the one that we built the scan with in the first place:
29
+ - name : Determine the Branch Reference for which the original action was triggered
30
+ id : determine_branch_ref
31
+ run : |
32
+ if [ -n "${{ github.event.workflow_run.pull_requests[0].base.ref }}" ]; then
33
+ BRANCH_REF="${{ github.event.workflow_run.pull_requests[0].base.ref }}"
34
+ else
35
+ BRANCH_REF="${{ github.event.workflow_run.head_branch }}"
36
+ fi
37
+ echo "original_branch_ref=$BRANCH_REF" >> "$GITHUB_OUTPUT"
27
38
# Checkout target branch which has trusted code
28
39
- name : Check out target branch
29
40
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
30
41
with :
31
42
persist-credentials : false
32
- ref : ${{ github.ref }}
43
+ ref : ${{ steps.determine_branch_ref.outputs.original_branch_ref }}
33
44
- name : Set up Java 21
34
45
uses : actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # 4.7.1
35
46
with :
You can’t perform that action at this time.
0 commit comments