From c838a38ea108130fd85ae02fa0d3cb737a52e99d Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Sat, 28 May 2022 08:55:58 -0600 Subject: [PATCH] Combine all integTest workflows into 2 workflow runs - Workflow to run all integTest workflows, allowing use of prior cache entries - Workflow that starts with empty cache Both of these use workflow_call to combine the existing workflows. --- ...ql-analysis.yml => ci-codeql-analysis.yml} | 0 .github/workflows/ci-full-check.yml | 63 +++++++++++++++++++ .github/workflows/ci-quick-check.yml | 40 ++++++++++++ .../{dev.yml => ci-verify-outputs.yml} | 0 ...ilure-cases.yml => demo-failure-cases.yml} | 3 - ...ent.yml => demo-pr-build-scan-comment.yml} | 0 ...l => integ-test-action-inputs-caching.yml} | 21 +++---- ...nputs.yml => integ-test-action-inputs.yml} | 16 ++--- ... => integ-test-execution-with-caching.yml} | 18 +++--- ...execution.yml => integ-test-execution.yml} | 16 ++--- ...ons.yml => integ-test-gradle-versions.yml} | 16 ++--- ...nteg-test-restore-configuration-cache.yml} | 28 ++++----- ...integ-test-restore-custom-gradle-home.yml} | 19 ++---- ...yml => integ-test-restore-gradle-home.yml} | 17 +++-- ... => integ-test-restore-java-toolchain.yml} | 16 ++--- ...ml => integ-test-sample-gradle-plugin.yml} | 17 +++-- ...l.yml => integ-test-sample-kotlin-dsl.yml} | 17 +++-- 17 files changed, 180 insertions(+), 127 deletions(-) rename .github/workflows/{codeql-analysis.yml => ci-codeql-analysis.yml} (100%) create mode 100644 .github/workflows/ci-full-check.yml create mode 100644 .github/workflows/ci-quick-check.yml rename .github/workflows/{dev.yml => ci-verify-outputs.yml} (100%) rename .github/workflows/{failure-cases.yml => demo-failure-cases.yml} (89%) rename .github/workflows/{pr-build-scan-comment.yml => demo-pr-build-scan-comment.yml} (100%) rename .github/workflows/{integTest-caching-config.yml => integ-test-action-inputs-caching.yml} (88%) rename .github/workflows/{integTest-action-inputs.yml => integ-test-action-inputs.yml} (68%) rename .github/workflows/{integTest-execution-with-caching.yml => integ-test-execution-with-caching.yml} (72%) rename .github/workflows/{integTest-execution.yml => integ-test-execution.yml} (88%) rename .github/workflows/{integTest-gradle-versions.yml => integ-test-gradle-versions.yml} (88%) rename .github/workflows/{integTest-caching-configuration-cache.yml => integ-test-restore-configuration-cache.yml} (78%) rename .github/workflows/{integTest-gradle-user-home.yml => integ-test-restore-custom-gradle-home.yml} (76%) rename .github/workflows/{integTest-caching-gradle-home.yml => integ-test-restore-gradle-home.yml} (89%) rename .github/workflows/{integTest-caching-java-toolchain.yml => integ-test-restore-java-toolchain.yml} (79%) rename .github/workflows/{integTest-sample-gradle-plugin.yml => integ-test-sample-gradle-plugin.yml} (77%) rename .github/workflows/{integTest-sample-kotlin-dsl.yml => integ-test-sample-kotlin-dsl.yml} (76%) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/ci-codeql-analysis.yml similarity index 100% rename from .github/workflows/codeql-analysis.yml rename to .github/workflows/ci-codeql-analysis.yml diff --git a/.github/workflows/ci-full-check.yml b/.github/workflows/ci-full-check.yml new file mode 100644 index 0000000..4754a6b --- /dev/null +++ b/.github/workflows/ci-full-check.yml @@ -0,0 +1,63 @@ +name: Run integration tests starting with empty cache + +on: + pull_request: + types: [assigned, review_requested] + push: + branches: [ main, dd/dpe-main ] + +jobs: + action-inputs: + uses: ./.github/workflows/integ-test-action-inputs.yml + with: + cache-key-prefix: ${{github.run_number}}- + + caching-config: + uses: ./.github/workflows/integ-test-action-inputs-caching.yml + with: + cache-key-prefix: ${{github.run_number}}- + + execution-with-caching: + uses: ./.github/workflows/integ-test-execution-with-caching.yml + with: + cache-key-prefix: ${{github.run_number}}- + + execution: + uses: ./.github/workflows/integ-test-execution.yml + with: + cache-key-prefix: ${{github.run_number}}- + + gradle-versions: + uses: ./.github/workflows/integ-test-gradle-versions.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-configuration-cache: + uses: ./.github/workflows/integ-test-restore-configuration-cache.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-custom-gradle-home: + uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-gradle-home: + uses: ./.github/workflows/integ-test-restore-gradle-home.yml + with: + cache-key-prefix: ${{github.run_number}}- + + restore-java-toolchain: + uses: ./.github/workflows/integ-test-restore-java-toolchain.yml + with: + cache-key-prefix: ${{github.run_number}}- + + sample-kotlin-dsl: + uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml + with: + cache-key-prefix: ${{github.run_number}}- + + sample-gradle-plugin: + uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml + with: + cache-key-prefix: ${{github.run_number}}- diff --git a/.github/workflows/ci-quick-check.yml b/.github/workflows/ci-quick-check.yml new file mode 100644 index 0000000..6427178 --- /dev/null +++ b/.github/workflows/ci-quick-check.yml @@ -0,0 +1,40 @@ +name: Run integration tests allowing cache reuse + +on: + pull_request: + types: [assigned, review_requested] + push: + +jobs: + action-inputs: + uses: ./.github/workflows/integ-test-action-inputs.yml + + caching-config: + uses: ./.github/workflows/integ-test-action-inputs-caching.yml + + execution-with-caching: + uses: ./.github/workflows/integ-test-execution-with-caching.yml + + execution: + uses: ./.github/workflows/integ-test-execution.yml + + gradle-versions: + uses: ./.github/workflows/integ-test-gradle-versions.yml + + restore-configuration-cache: + uses: ./.github/workflows/integ-test-restore-configuration-cache.yml + + restore-custom-gradle-home: + uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml + + restore-gradle-home: + uses: ./.github/workflows/integ-test-restore-gradle-home.yml + + restore-java-toolchain: + uses: ./.github/workflows/integ-test-restore-java-toolchain.yml + + sample-kotlin-dsl: + uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml + + sample-gradle-plugin: + uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml diff --git a/.github/workflows/dev.yml b/.github/workflows/ci-verify-outputs.yml similarity index 100% rename from .github/workflows/dev.yml rename to .github/workflows/ci-verify-outputs.yml diff --git a/.github/workflows/failure-cases.yml b/.github/workflows/demo-failure-cases.yml similarity index 89% rename from .github/workflows/failure-cases.yml rename to .github/workflows/demo-failure-cases.yml index 762c69d..c96f073 100644 --- a/.github/workflows/failure-cases.yml +++ b/.github/workflows/demo-failure-cases.yml @@ -3,9 +3,6 @@ name: Execute failure cases on: workflow_dispatch: -env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- - jobs: failing-build: diff --git a/.github/workflows/pr-build-scan-comment.yml b/.github/workflows/demo-pr-build-scan-comment.yml similarity index 100% rename from .github/workflows/pr-build-scan-comment.yml rename to .github/workflows/demo-pr-build-scan-comment.yml diff --git a/.github/workflows/integTest-caching-config.yml b/.github/workflows/integ-test-action-inputs-caching.yml similarity index 88% rename from .github/workflows/integTest-caching-config.yml rename to .github/workflows/integ-test-action-inputs-caching.yml index fd1edb5..b0bc57a 100644 --- a/.github/workflows/integTest-caching-config.yml +++ b/.github/workflows/integ-test-action-inputs-caching.yml @@ -1,19 +1,14 @@ -name: Test caching configuration +name: Test action inputs that control caching on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-caching-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: @@ -111,7 +106,7 @@ jobs: # Test seed the cache with cache-write-only and verify with cache-read-only seed-build-write-only: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-write-only- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only- strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] @@ -129,7 +124,7 @@ jobs: verify-write-only-build: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-write-only- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only- needs: seed-build-write-only strategy: matrix: diff --git a/.github/workflows/integTest-action-inputs.yml b/.github/workflows/integ-test-action-inputs.yml similarity index 68% rename from .github/workflows/integTest-action-inputs.yml rename to .github/workflows/integ-test-action-inputs.yml index 328ff40..0fd641f 100644 --- a/.github/workflows/integTest-action-inputs.yml +++ b/.github/workflows/integ-test-action-inputs.yml @@ -1,19 +1,15 @@ name: Test different action inputs on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: action-inputs: diff --git a/.github/workflows/integTest-execution-with-caching.yml b/.github/workflows/integ-test-execution-with-caching.yml similarity index 72% rename from .github/workflows/integTest-execution-with-caching.yml rename to .github/workflows/integ-test-execution-with-caching.yml index 374eda0..3627f43 100644 --- a/.github/workflows/integTest-execution-with-caching.yml +++ b/.github/workflows/integ-test-execution-with-caching.yml @@ -1,19 +1,15 @@ -name: Test save/restore Gradle state with direct execution +name: Test save/restore Gradle Home with direct execution on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-with-caching-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: seed-build: diff --git a/.github/workflows/integTest-execution.yml b/.github/workflows/integ-test-execution.yml similarity index 88% rename from .github/workflows/integTest-execution.yml rename to .github/workflows/integ-test-execution.yml index e59a993..4af4d42 100644 --- a/.github/workflows/integTest-execution.yml +++ b/.github/workflows/integ-test-execution.yml @@ -1,19 +1,15 @@ name: Test Gradle execution on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: # Tests for executing with different Gradle versions. diff --git a/.github/workflows/integTest-gradle-versions.yml b/.github/workflows/integ-test-gradle-versions.yml similarity index 88% rename from .github/workflows/integTest-gradle-versions.yml rename to .github/workflows/integ-test-gradle-versions.yml index 5e7a3d7..044f760 100644 --- a/.github/workflows/integTest-gradle-versions.yml +++ b/.github/workflows/integ-test-gradle-versions.yml @@ -1,19 +1,15 @@ name: Test provision different Gradle versions on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: gradle-versions-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: # Tests for executing with different Gradle versions. diff --git a/.github/workflows/integTest-caching-configuration-cache.yml b/.github/workflows/integ-test-restore-configuration-cache.yml similarity index 78% rename from .github/workflows/integTest-caching-configuration-cache.yml rename to .github/workflows/integ-test-restore-configuration-cache.yml index 4aaedee..9798195 100644 --- a/.github/workflows/integTest-caching-configuration-cache.yml +++ b/.github/workflows/integ-test-restore-configuration-cache.yml @@ -1,26 +1,20 @@ name: Test save/restore configuration-cache state on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: - # Run initial Gradle builds to push initial cache entries - # These builds should start fresh without cache hits, due to the seed injected into the cache key above. seed-build-groovy: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-groovy- strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] @@ -36,7 +30,7 @@ jobs: verify-build-groovy: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-groovy- needs: seed-build-groovy strategy: matrix: @@ -63,7 +57,7 @@ jobs: # Check that the build can run when no extracted cache entries are restored gradle-user-home-not-fully-restored: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-groovy- needs: seed-build-groovy strategy: matrix: @@ -84,7 +78,7 @@ jobs: seed-build-kotlin: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-kotlin- strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] @@ -100,7 +94,7 @@ jobs: modify-build-kotlin: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-kotlin- needs: seed-build-kotlin strategy: matrix: @@ -118,7 +112,7 @@ jobs: # Test restore configuration-cache from the third build invocation verify-build-kotlin: env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-kotlin- needs: modify-build-kotlin strategy: matrix: diff --git a/.github/workflows/integTest-gradle-user-home.yml b/.github/workflows/integ-test-restore-custom-gradle-home.yml similarity index 76% rename from .github/workflows/integTest-gradle-user-home.yml rename to .github/workflows/integ-test-restore-custom-gradle-home.yml index 8ccfe52..c633166 100644 --- a/.github/workflows/integTest-gradle-user-home.yml +++ b/.github/workflows/integ-test-restore-custom-gradle-home.yml @@ -1,24 +1,17 @@ name: Test caching with a custom GRADLE_USER_HOME on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- - GRADLE_USER_HOME: ${{github.workspace}}/custom/gradle/home + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: - # Run initial Gradle builds to push initial cache entries - # These builds should start fresh without cache hits, due to the seed injected into the cache key above. seed-build: strategy: matrix: diff --git a/.github/workflows/integTest-caching-gradle-home.yml b/.github/workflows/integ-test-restore-gradle-home.yml similarity index 89% rename from .github/workflows/integTest-caching-gradle-home.yml rename to .github/workflows/integ-test-restore-gradle-home.yml index cc88ddd..0f2cb9a 100644 --- a/.github/workflows/integTest-caching-gradle-home.yml +++ b/.github/workflows/integ-test-restore-gradle-home.yml @@ -1,19 +1,16 @@ name: Test save/restore Gradle Home directory on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: seed-build: diff --git a/.github/workflows/integTest-caching-java-toolchain.yml b/.github/workflows/integ-test-restore-java-toolchain.yml similarity index 79% rename from .github/workflows/integTest-caching-java-toolchain.yml rename to .github/workflows/integ-test-restore-java-toolchain.yml index 94cc32b..ff52382 100644 --- a/.github/workflows/integTest-caching-java-toolchain.yml +++ b/.github/workflows/integ-test-restore-java-toolchain.yml @@ -1,19 +1,15 @@ name: Test save/restore java toolchains on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }} + GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: seed-build: diff --git a/.github/workflows/integTest-sample-gradle-plugin.yml b/.github/workflows/integ-test-sample-gradle-plugin.yml similarity index 77% rename from .github/workflows/integTest-sample-gradle-plugin.yml rename to .github/workflows/integ-test-sample-gradle-plugin.yml index 4a20de7..80805f1 100644 --- a/.github/workflows/integTest-sample-gradle-plugin.yml +++ b/.github/workflows/integ-test-sample-gradle-plugin.yml @@ -1,19 +1,14 @@ name: Test caching with Gradle Plugin project using TestKit on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: @@ -42,6 +37,8 @@ jobs: uses: actions/checkout@v2 - name: Setup Gradle uses: ./ + with: + cache-read-only: true - name: Build gradle-plugin project working-directory: .github/workflow-samples/gradle-plugin run: ./gradlew build --offline diff --git a/.github/workflows/integTest-sample-kotlin-dsl.yml b/.github/workflows/integ-test-sample-kotlin-dsl.yml similarity index 76% rename from .github/workflows/integTest-sample-kotlin-dsl.yml rename to .github/workflows/integ-test-sample-kotlin-dsl.yml index 54bd408..02fee9f 100644 --- a/.github/workflows/integTest-sample-kotlin-dsl.yml +++ b/.github/workflows/integ-test-sample-kotlin-dsl.yml @@ -1,19 +1,14 @@ name: Test caching with Kotlin DSL on: - pull_request: - types: [assigned, review_requested] - push: - paths: - - '.github/**' - - 'dist/**' + workflow_call: + inputs: + cache-key-prefix: + type: string workflow_dispatch: -concurrency: - group: ${{ github.workflow }} - env: - GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}- + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }} GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true jobs: @@ -42,6 +37,8 @@ jobs: uses: actions/checkout@v2 - name: Setup Gradle uses: ./ + with: + cache-read-only: true - name: Build kotlin-dsl project working-directory: .github/workflow-samples/kotlin-dsl run: ./gradlew build --offline