Enable new gradle-home-cache-cleanup option (#2096)

This commit is contained in:
Harsh Shandilya 2022-08-30 22:08:46 +05:30 committed by GitHub
parent 302eefe791
commit eb04202410
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 46 additions and 16 deletions

View file

@ -30,6 +30,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease
gradle-home-cache-cleanup: true
env: env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }}

View file

@ -21,6 +21,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: --no-configuration-cache :autofill-parser:publishAllPublicationsToMavenCentralRepository arguments: --no-configuration-cache :autofill-parser:publishAllPublicationsToMavenCentralRepository
gradle-home-cache-cleanup: true
env: env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}
@ -31,6 +32,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: --no-configuration-cache closeAndReleaseRepository arguments: --no-configuration-cache closeAndReleaseRepository
gradle-home-cache-cleanup: true
env: env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.NEXUS_PUBLISH_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.NEXUS_PUBLISH_PASSWORD }}

View file

@ -36,6 +36,7 @@ jobs:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
with: with:
arguments: collectFreeReleaseApks collectNonFreeReleaseApks -PsentryUploadMappings arguments: collectFreeReleaseApks collectNonFreeReleaseApks -PsentryUploadMappings
gradle-home-cache-cleanup: true
- name: Clean secrets - name: Clean secrets
run: scripts/signing-cleanup.sh run: scripts/signing-cleanup.sh

View file

@ -47,6 +47,11 @@ jobs:
with: with:
version: ${{ github.event.milestone.title }} version: ${{ github.event.milestone.title }}
- name: Setup Gradle caching
uses: gradle/gradle-build-action@v2.3.0
with:
gradle-home-cache-cleanup: true
- name: Initialize git config and commit changes - name: Initialize git config and commit changes
shell: bash shell: bash
run: | run: |

View file

@ -43,6 +43,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: spotlessCheck arguments: spotlessCheck
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report - name: Upload Kotlin build report
if: "${{ always() }}" if: "${{ always() }}"
@ -84,6 +85,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: test -PslimTests arguments: test -PslimTests
gradle-home-cache-cleanup: true
- name: (Fail-only) Upload test report - name: (Fail-only) Upload test report
if: "${{ failure() }}" if: "${{ failure() }}"
@ -132,6 +134,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: assembleFreeDebug assembleNonFreeDebug arguments: assembleFreeDebug assembleNonFreeDebug
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report - name: Upload Kotlin build report
if: "${{ always() }}" if: "${{ always() }}"
@ -173,6 +176,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: apiCheck arguments: apiCheck
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report - name: Upload Kotlin build report
if: "${{ always() }}" if: "${{ always() }}"
@ -214,6 +218,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: lintDebug arguments: lintDebug
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report - name: Upload Kotlin build report
if: "${{ always() }}" if: "${{ always() }}"
@ -255,6 +260,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: aNFR arguments: aNFR
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report - name: Upload Kotlin build report
if: "${{ always() }}" if: "${{ always() }}"
@ -296,6 +302,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: detekt arguments: detekt
gradle-home-cache-cleanup: true
- name: Upload Kotlin build report - name: Upload Kotlin build report
if: "${{ always() }}" if: "${{ always() }}"

View file

@ -46,3 +46,4 @@ jobs:
DEP_OVERRIDE_agp: ${{ matrix.agp-version }} DEP_OVERRIDE_agp: ${{ matrix.agp-version }}
with: with:
arguments: check arguments: check
gradle-home-cache-cleanup: true

View file

@ -2,7 +2,7 @@ name: Sync localisations from Crowdin
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: '0 0 * * 6' - cron: '0 0 * * 0'
jobs: jobs:
sync-crowdin: sync-crowdin:
@ -21,6 +21,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: --no-configuration-cache crowdin arguments: --no-configuration-cache crowdin
gradle-home-cache-cleanup: true
env: env:
CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }} CROWDIN_LOGIN: ${{ secrets.CROWDIN_LOGIN }}
CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }} CROWDIN_PROJECT_KEY: ${{ secrets.CROWDIN_PROJECT_KEY }}
@ -30,10 +31,10 @@ jobs:
run: if [[ $(git diff --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi run: if [[ $(git diff --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
- name: Create Pull Request - name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4.1.1 uses: peter-evans/create-pull-request@v4.1.1
if: "env.UPDATED == 'true'" if: "env.UPDATED == 'true'"
with: with:
assignees: msfjarvis
author: GitHub Actions <noreply@github.com> author: GitHub Actions <noreply@github.com>
base: develop base: develop
body: This is an automated pull request to sync localisations from Crowdin. body: This is an automated pull request to sync localisations from Crowdin.
@ -42,3 +43,14 @@ jobs:
labels: A-localisation, P-low, S-waiting-on-review labels: A-localisation, P-low, S-waiting-on-review
title: Sync localisations from Crowdin title: Sync localisations from Crowdin
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- name: Close, re-open and enable squash merge for PR
if: "${{ steps.cpr.outputs.pull-request-operation == 'created' }}"
shell: bash
run: |
gh pr close "${PR_URL}"
gh pr reopen "${PR_URL}"
gh pr merge --squash --auto "${PR_URL}"
env:
GITHUB_TOKEN: ${{ secrets.PSL_UPDATE_TOKEN }}
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}

View file

@ -2,7 +2,7 @@ name: Update Publix Suffix List data
on: on:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
- cron: "0 0 * * 6" - cron: "0 0 * * 1"
jobs: jobs:
update-publicsuffix-data: update-publicsuffix-data:
@ -21,6 +21,7 @@ jobs:
uses: gradle/gradle-build-action@v2.3.0 uses: gradle/gradle-build-action@v2.3.0
with: with:
arguments: updatePSL arguments: updatePSL
gradle-home-cache-cleanup: true
- name: Compare list changes - name: Compare list changes
run: if [[ $(git diff --binary --stat) != "" ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi run: if [[ $(git diff --binary --stat) != "" ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi
@ -30,13 +31,13 @@ jobs:
if: "${{ env.UPDATED == 'true' }}" if: "${{ env.UPDATED == 'true' }}"
with: with:
arguments: :autofill-parser:test -PslimTests arguments: :autofill-parser:test -PslimTests
gradle-home-cache-cleanup: true
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v4.1.1 uses: peter-evans/create-pull-request@v4.1.1
if: "${{ env.UPDATED == 'true' }}" if: "${{ env.UPDATED == 'true' }}"
with: with:
assignees: msfjarvis
author: GitHub Actions <noreply@github.com> author: GitHub Actions <noreply@github.com>
base: develop base: develop
body: This is an automated pull request to update the publicsuffixes file to the latest copy from Mozilla body: This is an automated pull request to update the publicsuffixes file to the latest copy from Mozilla