77 description : ' The minor release branch name (e.g. release/v1.54.x)'
88 required : true
99 type : string
10- workflow_run :
11- workflows : [Create Release Branch]
12- types :
13- - completed
10+ repository_dispatch :
11+ types : [pin-system-tests]
1412
1513jobs :
1614 # TODO: Remove this job after confirming the workflow succeeds for release branches
2422
2523 pin-system-tests :
2624 name : " Pin system tests"
27- if : github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
2825 runs-on : ubuntu-latest
2926 permissions :
3027 contents : write
@@ -36,33 +33,16 @@ jobs:
3633 scope : DataDog/dd-trace-java
3734 policy : self.pin-system-tests.create-pr
3835
39- - name : Checkout repository for tag lookup
40- if : github.event_name == 'workflow_run'
41- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
42- with :
43- fetch-depth : 0 # fetch entire history, including tags
44-
45- - name : Get release branch name from tag
46- if : github.event_name == 'workflow_run'
47- id : get-release-branch
48- run : |
49- HEAD_SHA="${{ github.event.workflow_run.head_sha }}"
50- TAG=$(git tag --points-at "$HEAD_SHA" | grep -E '^v[0-9]+\.[0-9]+\.0$' | head -n 1)
51- if [[ -z "$TAG" ]]; then
52- echo "ERROR: Could not find tag that matches pattern 'vX.Y.0' and points at commit $HEAD_SHA"
53- exit 1
54- fi
55- echo "branch=release/${TAG%.0}.x" >> $GITHUB_OUTPUT
56-
5736 - name : Define base release branch
5837 id : define-base-branch
5938 run : |
6039 if [[ -n "${{ github.event.inputs.release-branch-name }}" ]]; then
6140 BASE_BRANCH=${{ github.event.inputs.release-branch-name }}
62- elif [[ "${{ github.event_name }}" == "workflow_run" ]]; then
63- BASE_BRANCH="${{ steps.get-release-branch.outputs.branch }}"
6441 else
65- echo "ERROR: Unable to determine base branch."
42+ BASE_BRANCH="${{ github.event.client_payload.release-branch-name }}"
43+ fi
44+ if [[ -z "$BASE_BRANCH" ]]; then
45+ echo "ERROR: Could not determine release branch"
6646 exit 1
6747 fi
6848 echo "base_branch=${BASE_BRANCH}" >> $GITHUB_OUTPUT
0 commit comments