Skip to content

Commit

Permalink
feat(gradle): support specifying custom Git ref to check out
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Aug 19, 2024
1 parent b244b36 commit 88fc11b
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/gradle-library-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
description: If JUnit test results are expected
default: true
type: boolean
checkout-ref:
description: Custom ref to check out
type: string
default: ''
secrets:
WETF_ARTIFACTORY_USER:
WETF_ARTIFACTORY_PASSWORD:
Expand All @@ -30,5 +34,6 @@ jobs:
java-version: ${{ inputs.java-version }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
checkout-ref: ${{ inputs.checkout-ref }}
notify-failure: false
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/gradle-library-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ on:
description: If JUnit test results are expected
default: true
type: boolean
checkout-ref:
description: Custom ref to check out
type: string
default: ''
semantic-release:
description: State if a release should be created using semantic-release if applicable
default: false
Expand Down Expand Up @@ -54,6 +58,7 @@ jobs:
java-version: ${{ inputs.java-version }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
checkout-ref: ${{ inputs.checkout-ref }}
semantic-release: ${{ inputs.semantic-release }}
semantic-release-dryrun: ${{ inputs.semantic-release-dryrun }}
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/gradle-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ on:
description: If this is a multi-module project
type: boolean
default: false
checkout-ref:
description: Custom ref to check out
type: string
default: ''
outputs:
release-published:
description: "The first output string"
Expand Down Expand Up @@ -93,6 +97,7 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ inputs.checkout-ref }}
submodules: ${{ inputs.submodules }}
# do not persist credentials because this clashes with semantic-release action
# (because the @semantic-release/git attempts to use them but needs permissions to bypass protection)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/gradle-service-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
description: If JUnit test results are expected
default: true
type: boolean
checkout-ref:
description: Custom ref to check out
type: string
default: ''
secrets:
# GH_PAT:
# required: true
Expand All @@ -51,5 +55,6 @@ jobs:
image-tag-3: ${{ inputs.image-tag-3 }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
checkout-ref: ${{ inputs.checkout-ref }}
notify-failure: false
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/gradle-service-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
description: If JUnit test results are expected
default: true
type: boolean
checkout-ref:
description: Custom ref to check out
type: string
default: ''
secrets:
# GH_PAT:
# required: true
Expand All @@ -55,4 +59,5 @@ jobs:
image-tag-3: ${{ inputs.image-tag-3 }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
checkout-ref: ${{ inputs.checkout-ref }}
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/gradle-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ on:
description: If this is a multi-module project
type: boolean
default: false
checkout-ref:
description: Custom ref to check out
type: string
default: ''
secrets:
# GH_PAT:
# required: true
Expand All @@ -51,6 +55,7 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ inputs.checkout-ref }}
# fetch-depth 0 is required to fetch all tags (and to determine the version based on tags)
fetch-depth: 0
# TODO similar to gradle-library:
Expand Down

0 comments on commit 88fc11b

Please sign in to comment.