mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
83d38501b8
Summary: As per: https://github.com/gradle/actions#the-wrapper-validation-action > Starting with v4 the setup-gradle action will [perform wrapper validation](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#gradle-wrapper-validation) on each execution. If you are using setup-gradle in your workflows, it is unlikely that you will need to use the wrapper-validation action. I'm moving to setup-gradle v4 and remove this unnecessary extra action. ## Changelog: [INTERNAL] - setup-gradle v4 + Remove unnecessary Gradle Wrapper Validation Pull Request resolved: https://github.com/facebook/react-native/pull/47389 Test Plan: CI Reviewed By: blakef Differential Revision: D65435069 Pulled By: cortinico fbshipit-source-id: c28b4d520e91fea9c59a341fb94598db5fc69900
21 lines
1.1 KiB
YAML
21 lines
1.1 KiB
YAML
name: Setup gradle
|
|
description: "Set up your GitHub Actions workflow with a specific version of gradle"
|
|
inputs:
|
|
cache-read-only:
|
|
description: "Whether the Gradle Cache should be in read-only mode so this job won't be allowed to write to it"
|
|
default: "true"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Setup gradle
|
|
uses: gradle/actions/setup-gradle@v4
|
|
with:
|
|
gradle-version: wrapper
|
|
# We want the Gradle cache to be written only on main/-stable branches run, and only for jobs with `cache-read-only` == false (i.e. `build_android`).
|
|
cache-read-only: ${{ (github.ref != 'refs/heads/main' && !contains(github.ref, '-stable')) || inputs.cache-read-only == 'true' }}
|
|
# Similarly, for those jobs we want to start with a clean cache so it doesn't grow without limits (this is the negation of the previous condition).
|
|
cache-write-only: ${{ (github.ref == 'refs/heads/main' || contains(github.ref, '-stable')) && inputs.cache-read-only != 'true' }}
|
|
# Temporarily disabling to try resolve a cache cleanup failure
|
|
# gradle-home-cache-cleanup: true
|
|
add-job-summary-as-pr-comment: on-failure
|