File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 inputs :
66 tag :
7- description : ' The minor release tag (e.g. v1.54.0 )'
7+ description : ' The minor release branch name (e.g. release/ v1.54.x )'
88 required : true
99 type : string
10- # for testing
11- push :
12- branches :
13- - sarahchen6/pin-system-tests-workflow
10+ # run workflow when a release branch is created
11+ create :
1412
1513jobs :
1614 pin-system-tests :
1715 name : " Pin system tests"
16+ if : github.event_name != 'create' || startsWith(github.ref, 'refs/heads/test/v')
1817 runs-on : ubuntu-latest
1918 permissions :
2019 contents : write # may not be needed
8180 create-branch : true
8281 command : push
8382 commits : " ${{ steps.create-commit.outputs.commit }}"
83+
84+ - name : Define base branch
85+ id : define-base-branch
86+ run : |
87+ if [[ -n "${{ github.event.inputs.tag }}" ]]; then
88+ BASE_BRANCH=${{ github.event.inputs.tag }}
89+ else
90+ BASE_BRANCH=${GITHUB_REF#refs/heads/}
91+ fi
92+ echo "base_branch=${BASE_BRANCH}" >> $GITHUB_OUTPUT
8493
8594 - name : Create pull request
8695 if : steps.check-changes.outputs.commit_changes == 'true' && steps.check-branch.outputs.creating_new_branch == 'true'
8998 # base may need to be `release/v*`
9099 run : |
91100 gh pr create --title "Pin system tests for release branch" \
92- --base release/v1.56.x \
101+ --base ${{ steps.define-base-branch.outputs.base_branch }} \
93102 --head ${{ steps.define-branch.outputs.branch }} \
94103 --label "tag: dependencies" \
95104 --label "tag: no release notes" \
You can’t perform that action at this time.
0 commit comments