[Github Actions]: Bump actions/cache from 4 to 5 #821
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Development Build Testing | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| workflow_dispatch: | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| jobs: | |
| lint-gms-flavor: | |
| if: | | |
| (github.event_name == 'push' && github.actor != 'dependabot[bot]') || | |
| (github.event_name == 'pull_request' && github.actor == 'dependabot[bot]') || | |
| github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Run Lint | |
| run: ./gradlew lintGmsRelease | |
| continue-on-error: false | |
| build-gms-flavor: | |
| if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' | |
| needs: lint-gms-flavor | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build GMS Release | |
| run: ./gradlew assembleGmsRelease | |
| continue-on-error: false | |
| lint-foss-flavor: | |
| if: | | |
| (github.event_name == 'push' && github.actor != 'dependabot[bot]') || | |
| (github.event_name == 'pull_request' && github.actor == 'dependabot[bot]') || | |
| github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Run Lint | |
| run: ./gradlew lintFossRelease | |
| continue-on-error: false | |
| build-foss-flavor: | |
| if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' | |
| needs: lint-foss-flavor | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: "21" | |
| distribution: "temurin" | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build FOSS Release | |
| run: ./gradlew assembleFossRelease | |
| continue-on-error: false | |
| automerge: | |
| needs: | |
| [lint-gms-flavor, build-gms-flavor, lint-foss-flavor, build-foss-flavor] | |
| if: > | |
| github.event_name == 'pull_request' && | |
| github.event.pull_request.user.login == 'dependabot[bot]' && | |
| needs.lint-gms-flavor.result == 'success' && | |
| needs.build-gms-flavor.result == 'success' && | |
| needs.lint-foss-flavor.result == 'success' && | |
| needs.build-foss-flavor.result == 'success' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - name: Enable auto-merge for Dependabot PRs | |
| uses: peter-evans/enable-pull-request-automerge@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| pull-request-number: ${{ github.event.pull_request.number }} | |
| merge-method: merge |