diff --git a/.github/workflows/gradle-library-check.yml b/.github/workflows/gradle-library-check.yml index a710040..185e6c2 100644 --- a/.github/workflows/gradle-library-check.yml +++ b/.github/workflows/gradle-library-check.yml @@ -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: @@ -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 diff --git a/.github/workflows/gradle-library-publish.yml b/.github/workflows/gradle-library-publish.yml index b85ee92..e400e53 100644 --- a/.github/workflows/gradle-library-publish.yml +++ b/.github/workflows/gradle-library-publish.yml @@ -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 @@ -31,6 +35,13 @@ on: description: If semantic release should do a dryrun default: false type: boolean + outputs: + release-published: + description: If a release was created + value: ${{ jobs.publish.outputs.release-published }} + release-version: + description: The release version if a release was created + value: ${{ jobs.publish.outputs.release-version }} secrets: WETF_ARTIFACTORY_USER: WETF_ARTIFACTORY_PASSWORD: @@ -47,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 diff --git a/.github/workflows/gradle-library.yml b/.github/workflows/gradle-library.yml index 73c512e..3ffaac5 100644 --- a/.github/workflows/gradle-library.yml +++ b/.github/workflows/gradle-library.yml @@ -62,6 +62,17 @@ 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: If a release was created + value: ${{ jobs.run.outputs.release-published }} + release-version: + description: The release version if a release was created + value: ${{ jobs.run.outputs.release-version }} secrets: # GH_PAT: # required: true @@ -78,10 +89,15 @@ jobs: run: runs-on: ubuntu-latest + outputs: + release-published: ${{ steps.gradle-release.outputs.release-published }} + release-version: ${{ steps.gradle-release.outputs.release-version }} + steps: - 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) @@ -181,6 +197,7 @@ jobs: private-key: "${{ secrets.WE_RELEASE_GITHUB_PRIVATE_KEY }}" - name: Publish/release with Gradle + id: gradle-release if: ${{ !inputs.skip-build && inputs.publish-tasks != '' }} uses: wetransform/gha-gradle-semantic-release@7df5afac738e0cf1ffb38917c17a6c4a5357a5af # v2.1.0 with: diff --git a/.github/workflows/gradle-service-check.yml b/.github/workflows/gradle-service-check.yml index a698b85..17ef999 100644 --- a/.github/workflows/gradle-service-check.yml +++ b/.github/workflows/gradle-service-check.yml @@ -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 @@ -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 diff --git a/.github/workflows/gradle-service-publish.yml b/.github/workflows/gradle-service-publish.yml index 02de36c..7dffe72 100644 --- a/.github/workflows/gradle-service-publish.yml +++ b/.github/workflows/gradle-service-publish.yml @@ -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 @@ -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 diff --git a/.github/workflows/gradle-service.yml b/.github/workflows/gradle-service.yml index 0630cc1..c8a130f 100644 --- a/.github/workflows/gradle-service.yml +++ b/.github/workflows/gradle-service.yml @@ -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 @@ -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: