File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 4545permissions : {}
4646
4747jobs :
48+ validate-inputs :
49+ name : Validate inputs
50+ runs-on : ubuntu-24.04
51+ steps :
52+ - name : Ensure a commit SHA or PR numbers are provided
53+ env :
54+ INPUTS_COMMIT_SHA : ${{ inputs.commit-sha }}
55+ INPUTS_PR_NUMBERS : ${{ inputs.pr_numbers }}
56+ run : |
57+ if [ -z "${INPUTS_COMMIT_SHA}" ] && [ -z "${INPUTS_PR_NUMBERS}" ]; then
58+ echo "::error::A commit SHA or PR number(s) must be included."
59+ exit 1
60+ fi
61+
4862 get-branches :
4963 name : Get target branches
64+ needs : [ 'validate-inputs' ]
5065 runs-on : ubuntu-24.04
5166 outputs :
5267 branches : ${{ steps.branches.outputs.result }}
8297
8398 backport :
8499 name : ' Backport to ${{ matrix.branch }}'
85- needs : [ 'get-branches' ]
100+ needs : [ 'validate-inputs', ' get-branches' ]
86101 if : ${{ needs.get-branches.outputs.branches != '[]' }}
87102 runs-on : ubuntu-24.04
88103 permissions :
You can’t perform that action at this time.
0 commit comments