Skip to content

Commit 6a2e42d

Browse files
authored
allow running Maven Publish workflow for a specific git ref (#115)
1 parent 46dc2f9 commit 6a2e42d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/run_gradle_task.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ run-name: "Gradle Task ${{ inputs.gradle-task }} @ ${{ inputs.runs-on }}"
55

66
on:
77
workflow_dispatch:
8+
inputs:
9+
checkout-ref:
10+
description: "The repository reference to checkout"
11+
required: false
12+
type: string
813
workflow_call:
914
inputs:
1015
gradle-task:
@@ -40,6 +45,8 @@ jobs:
4045

4146
- name: Checkout the repo
4247
uses: actions/checkout@v3
48+
with:
49+
ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}
4350

4451
- name: Validate Gradle Wrapper
4552
uses: gradle/wrapper-validation-action@v1

.github/workflows/run_publish_maven.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Publish Maven
33

44
on:
55
workflow_dispatch:
6+
inputs:
7+
checkout-ref:
8+
description: "The repository reference to checkout"
9+
required: false
10+
type: string
611
workflow_call:
712

813

@@ -30,3 +35,4 @@ jobs:
3035
runs-on: macos-latest # only macOS supports building all Kotlin targets
3136
gradle-task: >-
3237
publishAllPublicationsToSonatypeReleaseRepository --stacktrace --no-configuration-cache --no-parallel
38+
checkout-ref: ${{ inputs.checkout-ref || github.event.repository.default_branch }}

0 commit comments

Comments
 (0)