File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ name: Upstream Sync Workflow
77 description : ' The OpenStack release series you wish to sync against.'
88 required : true
99 type : string
10+ branch_prefix :
11+ description : ' The prefix of the upstream branch you want to sync against.'
12+ required : false
13+ type : string
14+ default : stable
1015env :
1116 GITHUB_TOKEN : ${{github.token}}
1217 DOWNSTREAM_OWNER : stackhpc
2025 run : |
2126 upstream_sha=$(gh api \
2227 -H "Accept: application/vnd.github.v3+json" \
23- "/repos/${{env.UPSTREAM_OWNER}}/$(basename $(pwd))/commits/stable /${{inputs.release_series}}" --jq ".sha")
28+ "/repos/${{env.UPSTREAM_OWNER}}/$(basename $(pwd))/commits/${{inputs.branch_prefix}} /${{inputs.release_series}}" --jq ".sha")
2429 echo "result=$upstream_sha" >> $GITHUB_OUTPUT
2530 - name : Check if downstream branch exists
2631 id : check_if_downstream_branch_exists
5156 -H "Accept: application/vnd.github.v3+json" \
5257 "/repos/${{env.DOWNSTREAM_OWNER}}/$(basename $(pwd))"\
5358 "/compare/stackhpc/${{inputs.release_series}}..."\
54- "${{env.UPSTREAM_OWNER}}:stable /${{inputs.release_series}}" --jq '.ahead_by')
59+ "${{env.UPSTREAM_OWNER}}:${{inputs.branch_prefix}} /${{inputs.release_series}}" --jq '.ahead_by')
5560 echo "result=$ahead_by" >> $GITHUB_OUTPUT
5661 - name : Create copy of the upstream branch
5762 if : steps.check_if_ahead.outputs.result > 0
You can’t perform that action at this time.
0 commit comments