Skip to content

Commit 6da5967

Browse files
committed
GHA updates
1 parent ffff1a2 commit 6da5967

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

.github/workflows/run_gradle_task.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ on:
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:
@@ -25,11 +25,11 @@ on:
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

.github/workflows/run_publish_maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
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

.github/workflows/run_tests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@ name: Tests
33

44
on:
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

919
concurrency:

.github/workflows/workflow_release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
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:
@@ -15,7 +15,7 @@ on:
1515

1616

1717
concurrency:
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 }}

0 commit comments

Comments
 (0)