diff --git a/.github/workflows/populate-gradle-build-cache.yml b/.github/workflows/populate-gradle-build-cache.yml new file mode 100644 index 000000000..666d6c58a --- /dev/null +++ b/.github/workflows/populate-gradle-build-cache.yml @@ -0,0 +1,28 @@ +# Build the app on each push to `develop`, populating the build cache to speed +# up CI on PRs. + +name: Populate build cache + +on: + push: + branches: + - develop + +jobs: + build: + name: app:buildGreenDebug + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + + - uses: gradle/gradle-build-action@v2 + with: + cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} + + - name: Run app:buildGreenDebug + run: ./gradlew app:buildGreenDebug