From 73d28ac0e640cbc4bcfb04ef5e2bfa045593ebb5 Mon Sep 17 00:00:00 2001 From: Puneet Behl Date: Sat, 25 Nov 2023 02:13:46 +0530 Subject: [PATCH] Update Java CI Workflow --- .github/workflows/gradle.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index b72f27f..5f1d6c8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -37,10 +37,18 @@ jobs: GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} with: arguments: build -Dgeb.env=chromeHeadless + publish: + if: github.event_name == 'push' + needs: container-job + runs-on: ubuntu-latest + steps: + - uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: 11 - name: Publish Artifacts (repo.grails.org) id: publish uses: gradle/gradle-build-action@v2 - if: steps.build.outcome == 'success' && github.event_name == 'push' env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} @@ -51,7 +59,7 @@ jobs: arguments: -Dorg.gradle.internal.publish.checksums.insecure=true publish - name: Build Docs id: docs - if: steps.build.outcome == 'success' && github.event_name == 'push' + if: success() uses: gradle/gradle-build-action@v2 with: arguments: :grails-redis:groovydoc @@ -60,7 +68,7 @@ jobs: GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_USER }} GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY: ${{ secrets.GRADLE_ENTERPRISE_BUILD_CACHE_NODE_KEY }} - name: Publish to Github Pages - if: steps.docs.outcome == 'success' && github.event_name == 'push' + if: success() uses: grails/github-pages-deploy-action@v2.0.2 env: TARGET_REPOSITORY: ${{ github.repository }}