From addd6705edfc846f210c8bd36d8355493462d879 Mon Sep 17 00:00:00 2001 From: Sergei Kozelko Date: Fri, 9 Sep 2022 08:40:51 +0300 Subject: [PATCH] Update GitHub workflows (#995) * Update CodeQL to v2 v1 is deprecated, see https://github.blog/changelog/2022-04-27-code-scanning-deprecation-of-codeql-action-v1/ * Use gradle action for build * Update checkout to v3 * Update setup-java to v3 * Update upload-artifact to v3 * Setup Dependabot to update GitHub actions --- .github/dependabot.yml | 5 +++++ .github/workflows/build.yml | 15 +++++++-------- .github/workflows/codeql-analysis.yml | 11 ++++++----- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 85e02951..06c28976 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,8 @@ updates: directory: / schedule: interval: daily + + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2414018..3756e754 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,22 +11,21 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set-up JDK 11 - uses: actions/setup-java@v2 + uses: actions/setup-java@v3 with: java-version: '11' distribution: 'temurin' - - name: Grant Execute Permission for gradlew - run: chmod +x gradlew - - - name: Build with Gradle - run: ./gradlew build -x lint + - name: Setup and build with Gradle + uses: gradle/gradle-build-action@v2 + with: + arguments: build -x lint - name: Upload apk - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Infinity-${{github.sha}} path: app/build/outputs/apk/ diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f4dc0ba2..abfccdee 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,8 @@ name: CodeQL on: push: - branches: master + branches: + - master pull_request: workflow_dispatch: schedule: @@ -19,15 +20,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: java - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2