From 968507aba0c7b7bb7c3df0ee1bd6caa8bd0fcc9f Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Mon, 6 Dec 2021 23:49:29 +0530 Subject: [PATCH] Convert all GHA references to normal versions (#1570) --- .github/workflows/dependency_sync.yml | 6 +-- .github/workflows/deploy_github_releases.yml | 37 ++++++++++--------- .github/workflows/deploy_library_releases.yml | 15 +++++--- .github/workflows/deploy_snapshot.yml | 13 ++++--- .github/workflows/draft_new_release.yml | 15 +++++--- .github/workflows/pull_request.yml | 19 ++++++---- .github/workflows/sync_crowdin.yml | 13 ++++--- .../workflows/update_publicsuffix_data.yml | 17 ++++++--- .github/workflows/validate_gradle_wrapper.yml | 4 +- 9 files changed, 82 insertions(+), 57 deletions(-) diff --git a/.github/workflows/dependency_sync.yml b/.github/workflows/dependency_sync.yml index ccc4d1ba..98f3cef0 100644 --- a/.github/workflows/dependency_sync.yml +++ b/.github/workflows/dependency_sync.yml @@ -33,13 +33,13 @@ jobs: - uses: gradle/wrapper-validation-action@v1 - name: Set up JDK - uses : actions/setup-java@v2 + uses : actions/setup-java@v2.4.0 with : - distribution : 'adopt' + distribution : 'zulu' java-version : '11' cache: 'gradle' - - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + - uses: gradle/gradle-build-action@v2.0.1 name: run dependencySync with: arguments: | diff --git a/.github/workflows/deploy_github_releases.yml b/.github/workflows/deploy_github_releases.yml index 05b90e2c..252d3d01 100644 --- a/.github/workflows/deploy_github_releases.yml +++ b/.github/workflows/deploy_github_releases.yml @@ -9,12 +9,15 @@ jobs: name: Build release binaries runs-on: ubuntu-latest steps: - - uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 - with: - java-version: '11' + - name: Set up JDK + uses : actions/setup-java@v2.4.0 + with : + distribution : 'zulu' + java-version : '11' + cache: 'gradle' - name: Checkout repository - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@v2.4.0 - name: Decrypt secrets run: scripts/signing-setup.sh "$ENCRYPT_KEY" @@ -25,24 +28,24 @@ jobs: run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Build release binaries - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + uses: gradle/gradle-build-action@v2.0.1 with: arguments: :app:assembleFreeRelease :app:assembleNonFreeRelease :app:bundleNonFreeRelease - name: Upload non-free release APK - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@v2.2.4 with: name: APS Non-Free Release APK path: app/build/outputs/apk/nonFree/release/app-nonFree-release.apk - name: Upload non-free release Bundle - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@v2.2.4 with: name: APS Non-Free Release Bundle path: app/build/outputs/bundle/nonFreeRelease/app-nonFree-release.aab - name: Upload free release APK - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@v2.2.4 with: name: APS Free Release APK path: app/build/outputs/apk/free/release/app-free-release.apk @@ -57,36 +60,36 @@ jobs: needs: build steps: - name: Checkout - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@v2.4.0 - name: Get Non-Free Release APK - uses: actions/download-artifact@4a7a711286f30c025902c28b541c10e147a9b843 + uses: actions/download-artifact@v2.0.10 with: name: APS Non-Free Release APK path: artifacts/nonFree - name: Get Non-Free Bundle - uses: actions/download-artifact@4a7a711286f30c025902c28b541c10e147a9b843 + uses: actions/download-artifact@v2.0.10 with: name: APS Non-Free Release Bundle path: artifacts/nonFree - name: Get Free Release APK - uses: actions/download-artifact@4a7a711286f30c025902c28b541c10e147a9b843 + uses: actions/download-artifact@v2.0.10 with: name: APS Free Release APK path: artifacts/free - name: Get Changelog Entry id: changelog_reader - uses: mindsers/changelog-reader-action@e1a36842bddbd512340f882735802de843998e1f + uses: mindsers/changelog-reader-action@v2.0.0 with: version: ${{ github.ref }} path: ./CHANGELOG.md - name: Create Release id: create_release - uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e + uses: actions/create-release@v1.1.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -101,7 +104,7 @@ jobs: run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} - name: Upload Non-Free Release Apk - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -111,7 +114,7 @@ jobs: asset_content_type: application/vnd.android.package-archive - name: Upload Non-Free Release Bundle - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -121,7 +124,7 @@ jobs: asset_content_type: application/octet-stream - name: Upload Free Release Apk - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 + uses: actions/upload-release-asset@v1.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/deploy_library_releases.yml b/.github/workflows/deploy_library_releases.yml index d3c27a91..1b8e11c2 100644 --- a/.github/workflows/deploy_library_releases.yml +++ b/.github/workflows/deploy_library_releases.yml @@ -9,12 +9,15 @@ jobs: publish-release: runs-on: ubuntu-latest steps: - - uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 - with: - java-version: '11' + - name: Set up JDK + uses : actions/setup-java@v2.4.0 + with : + distribution : 'zulu' + java-version : '11' + cache: 'gradle' - name: Checkout repository - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@v2.4.0 - name: Determine publishing task id: task-select @@ -28,7 +31,7 @@ jobs: fi - name: Upload binaries - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + uses: gradle/gradle-build-action@v2.0.1 with: arguments: :${{ steps.task-select.outputs.PROJECT }}:publishAllPublicationsToMavenCentralRepository env: @@ -38,7 +41,7 @@ jobs: ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.NEXUS_PUBLISH_GPG_KEY_PASSWORD }} - name: Close and release repository - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + uses: gradle/gradle-build-action@v2.0.1 with: arguments: closeAndReleaseRepository env: diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml index cc5e6b26..d3408231 100644 --- a/.github/workflows/deploy_snapshot.yml +++ b/.github/workflows/deploy_snapshot.yml @@ -9,12 +9,15 @@ jobs: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[ci skip]')" steps: - - uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 - with: - java-version: '11' + - name: Set up JDK + uses : actions/setup-java@v2.4.0 + with : + distribution : 'zulu' + java-version : '11' + cache: 'gradle' - name: Checkout repository - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@v2.4.0 - name: Decrypt secrets run: scripts/signing-setup.sh "$ENCRYPT_KEY" @@ -25,7 +28,7 @@ jobs: run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Build release app - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + uses: gradle/gradle-build-action@v2.0.1 env: SNAPSHOT: "true" with: diff --git a/.github/workflows/draft_new_release.yml b/.github/workflows/draft_new_release.yml index 329d111b..931c43b2 100644 --- a/.github/workflows/draft_new_release.yml +++ b/.github/workflows/draft_new_release.yml @@ -9,9 +9,12 @@ jobs: name: "Draft a new release" runs-on: ubuntu-latest steps: - - uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 - with: - java-version: '11' + - name: Set up JDK + uses : actions/setup-java@v2.4.0 + with : + distribution : 'zulu' + java-version : '11' + cache: 'gradle' - name: Extract version from milestone run: | @@ -35,12 +38,12 @@ jobs: echo "PR_BASE=release-${BRANCH_VERSION}" >> $GITHUB_ENV echo "PR_HEAD=release-prep" >> $GITHUB_ENV - - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + - uses: actions/checkout@v2.4.0 with: ref: ${{ env.CHECKOUT_REF }} - name: Update changelog - uses: thomaseizinger/keep-a-changelog-new-release@9f6c16b8af7dd10f8aa0ad740fd648b2cfe22171 + uses: thomaseizinger/keep-a-changelog-new-release@1.3.0 with: version: ${{ github.event.milestone.title }} @@ -75,7 +78,7 @@ jobs: git commit -m "build: bump version" - name: Create Pull Request - uses: peter-evans/create-pull-request@01f7dd1d28f5131231ba3ede0f1c8cb413584a1d + uses: peter-evans/create-pull-request@v3.11.0 with: author: GitHub Actions body: This is an automated pull request to bump the changelog for the ${{ github.event.milestone.title }} release. diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 964bf9ce..4831b791 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,12 +11,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@v2.4.0 with: fetch-depth: 0 - name: Check if relevant files have changed - uses: actions/github-script@a3e7071a34d7e1f219a8a4de9a5e0a34d1ee1293 + uses: actions/github-script@v4.0.0 id: service-changed with: result-encoding: string @@ -24,10 +24,13 @@ jobs: const script = require('.github/check-changed-files.js') return await script({github, context}) - - uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 + - name: Set up JDK if: ${{ steps.service-changed.outputs.result == 'true' }} - with: - java-version: '11' + uses : actions/setup-java@v2.4.0 + with : + distribution : 'zulu' + java-version : '11' + cache: 'gradle' - name: Copy CI gradle.properties if: ${{ steps.service-changed.outputs.result == 'true' }} @@ -35,19 +38,19 @@ jobs: - name: Build debug APKs if: ${{ steps.service-changed.outputs.result == 'true' }} - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + uses: gradle/gradle-build-action@v2.0.1 with: arguments: assembleFreeDebug assembleNonFreeDebug - name: Run unit tests if: ${{ steps.service-changed.outputs.result == 'true' }} - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + uses: gradle/gradle-build-action@v2.0.1 with: arguments: apiCheck test lintFreeDebug spotlessCheck -PslimTests - name: (Fail-only) upload test report if: failure() - uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 + uses: actions/upload-artifact@v2.2.4 with: name: Test report path: app/build/reports diff --git a/.github/workflows/sync_crowdin.yml b/.github/workflows/sync_crowdin.yml index ddaa1450..e6d6aed9 100644 --- a/.github/workflows/sync_crowdin.yml +++ b/.github/workflows/sync_crowdin.yml @@ -8,11 +8,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@v2.4.0 - - uses: actions/setup-java@d202f5dbf7256730fb690ec59f6381650114feb2 - with: - java-version: '11' + - name: Set up JDK + uses : actions/setup-java@v2.4.0 + with : + distribution : 'zulu' + java-version : '11' + cache: 'gradle' - name: Download new translations from Crowdin run: ./gradlew crowdin @@ -25,7 +28,7 @@ jobs: run: if [[ $(git diff --stat) != '' ]]; then echo "UPDATED=true" >> $GITHUB_ENV; fi - name: Create Pull Request - uses: peter-evans/create-pull-request@01f7dd1d28f5131231ba3ede0f1c8cb413584a1d + uses: peter-evans/create-pull-request@v3.11.0 if: env.UPDATED == 'true' with: assignees: msfjarvis diff --git a/.github/workflows/update_publicsuffix_data.yml b/.github/workflows/update_publicsuffix_data.yml index bc6132c9..1fcb40e8 100644 --- a/.github/workflows/update_publicsuffix_data.yml +++ b/.github/workflows/update_publicsuffix_data.yml @@ -9,10 +9,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + uses: actions/checkout@v2.4.0 + + - name: Set up JDK + uses : actions/setup-java@v2.4.0 + with : + distribution : 'zulu' + java-version : '11' + cache: 'gradle' - name: Download new publicsuffix data - uses: gradle/gradle-build-action@cba1833ddecbbee649950c284416981928631008 + uses: gradle/gradle-build-action@v2.0.1 with: arguments: updatePSL @@ -27,7 +34,7 @@ jobs: - name: Create Pull Request id: cpr - uses: peter-evans/create-pull-request@01f7dd1d28f5131231ba3ede0f1c8cb413584a1d + uses: peter-evans/create-pull-request@v3.11.0 if: env.UPDATED == 'true' with: assignees: msfjarvis @@ -42,14 +49,14 @@ jobs: - name: Auto approve if: steps.cpr.outputs.pull-request-operation == 'created' - uses: juliangruber/approve-pull-request-action@36e19d8a79c9c62bf85a0565cb2799a3cf395343 + uses: juliangruber/approve-pull-request-action@v1.1.0 with: github-token: ${{ secrets.PSL_UPDATE_TOKEN }} number: ${{ steps.cpr.outputs.pull-request-number }} - name: Enable Pull Request Automerge if: steps.cpr.outputs.pull-request-operation == 'created' - uses: peter-evans/enable-pull-request-automerge@d2ede5636b3febc92809259995e643565e675aab + uses: peter-evans/enable-pull-request-automerge@v1.1.0 with: token: ${{ secrets.PSL_UPDATE_TOKEN }} pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} diff --git a/.github/workflows/validate_gradle_wrapper.yml b/.github/workflows/validate_gradle_wrapper.yml index 8d83d5f0..ac127465 100644 --- a/.github/workflows/validate_gradle_wrapper.yml +++ b/.github/workflows/validate_gradle_wrapper.yml @@ -12,5 +12,5 @@ jobs: name: "Wrapper validation" runs-on: ubuntu-latest steps: - - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f - - uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b + - uses: actions/checkout@v2.4.0 + - uses: gradle/wrapper-validation-action@v1.0.4