From 61c6c45867a33a45a32a71c29a87b14e02e5d2c3 Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Thu, 29 Jun 2023 08:33:29 -0700 Subject: [PATCH] Use OpenRewrite CI workflow Issue #4 --- .github/workflows/ci.yml | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d17d6b0..011eec1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,28 +10,22 @@ on: pull_request: branches: - main + workflow_dispatch: {} + schedule: + - cron: 0 17 * * * -env: - GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' - GRADLE_SWITCHES: "-s --console=plain --info --stacktrace" +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true jobs: build: - strategy: - fail-fast: false - matrix: - java: ["11"] - os: ["ubuntu-latest"] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: set-up-jdk - uses: actions/setup-java@v3 - with: - distribution: "temurin" - java-version: ${{ matrix.java }} - cache: "gradle" - - name: build - run: ./gradlew ${GRADLE_SWITCHES} build test + uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main + secrets: + gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} + gradle_enterprise_cache_username: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USERNAME }} + gradle_enterprise_cache_password: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} + ossrh_username: ${{ secrets.OSSRH_USERNAME }} + ossrh_token: ${{ secrets.OSSRH_TOKEN }} + ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }} + ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}