Skip to content

Commit

Permalink
fix(ci): update javaci workflow configurations (#13455)
Browse files Browse the repository at this point in the history
* fix(ci): update javaci workflow configurations

add job to publish grails doc for snapshot

* fix(ci): update javaci workflow configurations

only trigger docs when event is push
  • Loading branch information
puneetbehl authored Apr 4, 2024
1 parent 5a27f25 commit 9a6de21
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
contents: read # to fetch code (actions/checkout)
checks: write
runs-on: ubuntu-latest
outputs:
target_branch: ${{ steps.extract_branch.outputs.value }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -52,6 +54,13 @@ jobs:
with:
distribution: 'adopt'
java-version: 11
- name: Extract Target Branch
id: extract_branch
run: |
echo "Determining Target Branch"
TARGET_BRANCH=`cat $GITHUB_EVENT_PATH | jq '.release.target_commitish' | sed -e 's/^"\(.*\)"$/\1/g'`
echo $TARGET_BRANCH
echo "value=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
- name: Publish Artifacts (repo.grails.org)
id: publish
uses: gradle/gradle-build-action@29c0906b64b8fc82467890bfb7a0a7ef34bda89e # v3
Expand All @@ -63,6 +72,20 @@ jobs:
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
with:
arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish
docs:
if: github.event_name == 'push'
needs: publish
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Invoke grails-doc release workflow
uses: benc-uk/[email protected]
with:
workflow: Java CI
repo: grails/grails-doc
ref: ${{ needs.publish.outputs.target_branch }}
token: ${{ secrets.GH_TOKEN }}
invoke-third-party-workflows:
if: github.event_name == 'push'
needs: ["build", "publish"]
Expand Down

0 comments on commit 9a6de21

Please sign in to comment.