Merge pull request #3311 from element-hq/feature/bma/fixGradleUpdateAction

Gradle update action: Use JDK 17 and skip early in forks.
This commit is contained in:
Benoit Marty 2024-08-20 09:58:02 +02:00 committed by GitHub
commit 5a54ee74a0
2 changed files with 11 additions and 3 deletions

View file

@ -7,7 +7,8 @@
"PR-Dependencies" "PR-Dependencies"
], ],
"ignoreDeps" : [ "ignoreDeps" : [
"string:app_name" "string:app_name",
"gradle"
], ],
"packageRules" : [ "packageRules" : [
{ {

View file

@ -1,18 +1,25 @@
name: Update Gradle Wrapper name: Update Gradle Wrapper
on: on:
workflow_dispatch:
schedule: schedule:
- cron: "0 0 * * *" - cron: "0 0 * * *"
jobs: jobs:
update-gradle-wrapper: update-gradle-wrapper:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Skip in forks
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-java@v4
name: Use JDK 17
if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch'
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: Update Gradle Wrapper - name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v1 uses: gradle-update/update-gradle-wrapper-action@v1
# Skip in forks
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }}
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
target-branch: develop target-branch: develop