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