Skip to content

Commit

Permalink
feat(gradle): support private submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Nov 16, 2024
1 parent 7d4f56b commit b25037a
Show file tree
Hide file tree
Showing 6 changed files with 24 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
submodules:
# see https://github.com/actions/checkout
default: 'false'
type: string
checkout-ref:
description: Custom ref to check out
type: string
Expand Down Expand Up @@ -46,6 +50,7 @@ jobs:
java-version: ${{ inputs.java-version }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
submodules: ${{ inputs.submodules }}
checkout-ref: ${{ inputs.checkout-ref }}
skip-scan: ${{ inputs.skip-scan }}
upload-artifact-path: ${{ inputs.upload-artifact-path }}
Expand Down
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
submodules:
# see https://github.com/actions/checkout
default: 'false'
type: string
checkout-ref:
description: Custom ref to check out
type: string
Expand Down Expand Up @@ -70,6 +74,7 @@ jobs:
java-version: ${{ inputs.java-version }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
submodules: ${{ inputs.submodules }}
checkout-ref: ${{ inputs.checkout-ref }}
skip-scan: ${{ inputs.skip-scan }}
upload-artifact-path: ${{ inputs.upload-artifact-path }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gradle-library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ jobs:
persist-credentials: false
# fetch-depth 0 is required to fetch all tags (and to determine the version based on tags)
fetch-depth: ${{ inputs.publish-tasks != '' && '0' || '1' }}
# provide a token in case submodules are enabled and private (secret is expected to be present)
token: ${{ inputs.submodules != 'false' && secrets.GH_PAT || github.token }}

#
# Login to Docker Hub
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
submodules:
# see https://github.com/actions/checkout
default: 'false'
type: string
checkout-ref:
description: Custom ref to check out
type: string
Expand All @@ -55,6 +59,7 @@ jobs:
image-tag-3: ${{ inputs.image-tag-3 }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
submodules: ${{ inputs.submodules }}
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 @@ -35,6 +35,10 @@ on:
description: If JUnit test results are expected
default: true
type: boolean
submodules:
# see https://github.com/actions/checkout
default: 'false'
type: string
checkout-ref:
description: Custom ref to check out
type: string
Expand Down Expand Up @@ -73,6 +77,7 @@ jobs:
image-tag-3: ${{ inputs.image-tag-3 }}
multi-module: ${{ inputs.multi-module }}
expect-tests: ${{ inputs.expect-tests }}
submodules: ${{ inputs.submodules }}
checkout-ref: ${{ inputs.checkout-ref }}
semantic-release: ${{ inputs.semantic-release }}
semantic-release-dryrun: ${{ inputs.semantic-release-dryrun }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gradle-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ jobs:
persist-credentials: false
# fetch-depth 0 is required to fetch all tags (and to determine the version based on tags)
fetch-depth: ${{ inputs.publish-tasks != '' && '0' || '1' }}
# provide a token in case submodules are enabled and private (secret is expected to be present)
token: ${{ inputs.submodules != 'false' && secrets.GH_PAT || github.token }}

# For each environment variable's key-value pair, mask the value from logs.
- name: Populate custom environment variables
Expand Down

0 comments on commit b25037a

Please sign in to comment.