File tree Expand file tree Collapse file tree 4 files changed +24
-11
lines changed
Expand file tree Collapse file tree 4 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 1111 required : true
1212 type : string
1313 runs-on :
14- description : " OSes to run the task on"
14+ description : " OS to run the task on"
1515 required : true
1616 type : string
1717 checkout-ref :
18- description : " The repository reference to checkout"
18+ description : " The branch, tag or SHA to checkout. See actions/checkout 'ref'. "
1919 required : false
2020 type : string
2121 workflow_call :
2525 required : true
2626 type : string
2727 runs-on :
28- description : " OSes to run the task on"
28+ description : " OS to run the task on"
2929 required : true
3030 type : string
3131 checkout-ref :
32- description : " The repository reference to checkout"
32+ description : " The branch, tag or SHA to checkout. See actions/checkout 'ref'. "
3333 required : false
3434 type : string
3535
Original file line number Diff line number Diff line change 55 workflow_dispatch :
66 inputs :
77 checkout-ref :
8- description : " The repository reference to checkout"
8+ description : " The branch, tag or SHA to checkout. See actions/checkout 'ref'. "
99 required : false
1010 type : string
1111 workflow_call :
1212 inputs :
1313 checkout-ref :
14- description : " The repository reference to checkout"
14+ description : " The branch, tag or SHA to checkout. See actions/checkout 'ref'. "
1515 required : false
1616 type : string
1717
Original file line number Diff line number Diff line change @@ -3,7 +3,17 @@ name: Tests
33
44on :
55 workflow_dispatch :
6+ inputs :
7+ checkout-ref :
8+ description : " The branch, tag or SHA to checkout. See actions/checkout 'ref'."
9+ required : false
10+ type : string
611 workflow_call :
12+ inputs :
13+ checkout-ref :
14+ description : " The branch, tag or SHA to checkout. See actions/checkout 'ref'."
15+ required : false
16+ type : string
717
818
919concurrency :
Original file line number Diff line number Diff line change 55 workflow_dispatch :
66 inputs :
77 checkout-ref :
8- description : " The repository reference to checkout"
8+ description : " The branch, tag or SHA to checkout. See actions/checkout 'ref'. "
99 required : false
1010 type : string
1111 push :
1515
1616
1717concurrency :
18- group : " Releases: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
18+ group : " Releases: ${{ github.workflow }} @ ${{ inputs.checkout-ref }} ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
1919 cancel-in-progress : true
2020
2121
@@ -24,17 +24,20 @@ jobs:
2424 tests :
2525 uses : ./.github/workflows/run_tests.yml
2626 permissions :
27- contents : read
2827 checks : write
28+ contents : read
29+ with :
30+ checkout-ref : ${{ inputs.checkout-ref }}
2931
3032 publish-maven :
3133 needs : tests
32- if : github.ref == 'refs/heads/main'
34+ # only publish when manually triggered, or it's the main branch, or it's for a release
35+ if : inputs.checkout-ref || github.ref == 'refs/heads/main' || (github.event_name == 'release' && github.event.action == 'created')
3336 uses : ./.github/workflows/run_publish_maven.yml
3437 secrets : inherit
3538 permissions :
39+ checks : write
3640 contents : write
3741 packages : write
38- checks : write
3942 with :
4043 checkout-ref : ${{ inputs.checkout-ref }}
You can’t perform that action at this time.
0 commit comments