From 9d341c2c19aef996214ad5ead7140408cca577ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Brey?= Date: Fri, 16 Dec 2022 15:13:55 +0100 Subject: [PATCH] Pin remaining vactions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Brey --- .github/workflows/analysis.yml | 84 +++++++++---------- .github/workflows/assembleFlavors.yml | 52 ++++++------ .github/workflows/autoApproveDependabot.yml | 20 ++--- .github/workflows/check.yml | 34 ++++---- .github/workflows/command-rebase.yml | 12 +-- .github/workflows/fixup.yml | 2 +- .../workflows/gradle-wrapper-validation.yml | 16 ++-- .github/workflows/qa.yml | 66 +++++++-------- .github/workflows/stale.yml | 4 +- 9 files changed, 144 insertions(+), 146 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 6a3ce2ebc..d5b710707 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -1,49 +1,49 @@ name: "Analysis" on: - pull_request: - branches: [ master, stable-* ] - push: - branches: [ master, stable-* ] + pull_request: + branches: [ master, stable-* ] + push: + branches: [ master, stable-* ] permissions: - pull-requests: write - contents: write + pull-requests: write + contents: write jobs: - analysis: - runs-on: ubuntu-latest - steps: - - name: Setup variables - id: get-vars - run: | - if [ -z "$GITHUB_HEAD_REF" ]; then - # push - echo "::set-output name=branch::$GITHUB_REF_NAME" - echo "::set-output name=pr::$GITHUB_RUN_ID" - echo "::set-output name=repo::${{ github.repository }}" - else - # pull request - echo "::set-output name=branch::$GITHUB_HEAD_REF" - echo "::set-output name=pr::${{ github.event.pull_request.number }}" - echo "::set-output name=repo::${{ github.event.pull_request.head.repo.full_name }}" - fi - - uses: actions/checkout@v3 - with: - repository: ${{ steps.get-vars.outputs.repo }} - ref: ${{ steps.get-vars.outputs.branch }} - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - distribution: "temurin" - java-version: 11 - - name: Install dependencies - run: | - python3 -m pip install defusedxml - - name: Run analysis wrapper - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - mkdir -p $HOME/.gradle - echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties - scripts/analysis/analysis-wrapper.sh ${{ steps.get-vars.outputs.branch }} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} $GITHUB_RUN_NUMBER ${{ steps.get-vars.outputs.pr }} + analysis: + runs-on: ubuntu-latest + steps: + - name: Setup variables + id: get-vars + run: | + if [ -z "$GITHUB_HEAD_REF" ]; then + # push + echo "::set-output name=branch::$GITHUB_REF_NAME" + echo "::set-output name=pr::$GITHUB_RUN_ID" + echo "::set-output name=repo::${{ github.repository }}" + else + # pull request + echo "::set-output name=branch::$GITHUB_HEAD_REF" + echo "::set-output name=pr::${{ github.event.pull_request.number }}" + echo "::set-output name=repo::${{ github.event.pull_request.head.repo.full_name }}" + fi + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + with: + repository: ${{ steps.get-vars.outputs.repo }} + ref: ${{ steps.get-vars.outputs.branch }} + - name: Set up JDK 11 + uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3 + with: + distribution: "temurin" + java-version: 11 + - name: Install dependencies + run: | + python3 -m pip install defusedxml + - name: Run analysis wrapper + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir -p $HOME/.gradle + echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties + scripts/analysis/analysis-wrapper.sh ${{ steps.get-vars.outputs.branch }} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} $GITHUB_RUN_NUMBER ${{ steps.get-vars.outputs.pr }} diff --git a/.github/workflows/assembleFlavors.yml b/.github/workflows/assembleFlavors.yml index 5aedc804b..f13c3826f 100644 --- a/.github/workflows/assembleFlavors.yml +++ b/.github/workflows/assembleFlavors.yml @@ -1,34 +1,34 @@ name: "Assemble" on: - pull_request: - branches: [ master, stable-* ] + pull_request: + branches: [ master, stable-* ] # Declare default permissions as read only. permissions: read-all jobs: - flavor: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - flavor: [ Generic, Gplay ] - steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 - - name: set up JDK 11 - uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3 - with: - distribution: "temurin" - java-version: 11 - - name: Build ${{ matrix.flavor }} - run: | - echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" >> gradle.properties - ./gradlew assemble${{ matrix.flavor }} - - name: Archive apk - uses: actions/upload-artifact@v3 - if: ${{ always() }} - with: - name: Nextcloud-APK - path: app/build/outputs/apk/**/**/*.apk - retention-days: 5 + flavor: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + flavor: [ Generic, Gplay ] + steps: + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + - name: set up JDK 11 + uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3 + with: + distribution: "temurin" + java-version: 11 + - name: Build ${{ matrix.flavor }} + run: | + echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" >> gradle.properties + ./gradlew assemble${{ matrix.flavor }} + - name: Archive apk + uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3 + if: ${{ always() }} + with: + name: Nextcloud-APK + path: app/build/outputs/apk/**/**/*.apk + retention-days: 5 diff --git a/.github/workflows/autoApproveDependabot.yml b/.github/workflows/autoApproveDependabot.yml index 8deb91bf1..a52d6177c 100644 --- a/.github/workflows/autoApproveDependabot.yml +++ b/.github/workflows/autoApproveDependabot.yml @@ -1,16 +1,16 @@ name: Auto approve on: - pull_request_target: - branches: [ master, stable-* ] + pull_request_target: + branches: [ master, stable-* ] permissions: - pull-requests: write + pull-requests: write jobs: - auto-approve: - runs-on: ubuntu-latest - steps: - - uses: hmarr/auto-approve-action@de8ae18c173c131e182d4adf2c874d8d2308a85b # v3.1.0 - if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" + auto-approve: + runs-on: ubuntu-latest + steps: + - uses: hmarr/auto-approve-action@de8ae18c173c131e182d4adf2c874d8d2308a85b # v3.1.0 + if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6cd5cd65a..4627343b3 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,25 +1,25 @@ name: Check on: - pull_request: - branches: [ master, stable-* ] + pull_request: + branches: [ master, stable-* ] # Declare default permissions as read only. permissions: read-all jobs: - check: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - task: [ detekt, ktlintCheck ] - steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 - - name: Set up JDK 11 - uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3 - with: - distribution: "temurin" - java-version: 11 - - name: Check ${{ matrix.task }} - run: ./gradlew ${{ matrix.task }} + check: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + task: [ detekt, ktlintCheck ] + steps: + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + - name: Set up JDK 11 + uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3 + with: + distribution: "temurin" + java-version: 11 + - name: Check ${{ matrix.task }} + run: ./gradlew ${{ matrix.task }} diff --git a/.github/workflows/command-rebase.yml b/.github/workflows/command-rebase.yml index 78fcf5d19..4301f94dd 100644 --- a/.github/workflows/command-rebase.yml +++ b/.github/workflows/command-rebase.yml @@ -9,8 +9,8 @@ on: issue_comment: types: created -permissions: - contents: read +permissions: + contents: read jobs: rebase: @@ -23,7 +23,7 @@ jobs: steps: - name: Add reaction on start - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2 with: token: ${{ secrets.COMMAND_BOT_PAT }} repository: ${{ github.event.repository.full_name }} @@ -31,18 +31,18 @@ jobs: reaction-type: "+1" - name: Checkout the latest code - uses: actions/checkout@v3 + uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 with: fetch-depth: 0 token: ${{ secrets.COMMAND_BOT_PAT }} - name: Automatic Rebase - uses: cirrus-actions/rebase@1.7 + uses: cirrus-actions/rebase@6e572f08c244e2f04f9beb85a943eb618218714d # 1.7 env: GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }} - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 # v2 if: failure() with: token: ${{ secrets.COMMAND_BOT_PAT }} diff --git a/.github/workflows/fixup.yml b/.github/workflows/fixup.yml index 6092cc3a5..7d3c8b106 100644 --- a/.github/workflows/fixup.yml +++ b/.github/workflows/fixup.yml @@ -15,6 +15,6 @@ jobs: steps: - name: Run check - uses: xt0rted/block-autosquash-commits-action@v2 + uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 0e649b2e9..16180ab01 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -1,16 +1,16 @@ name: "Validate Gradle Wrapper" on: - pull_request: - branches: [ master, stable-* ] + pull_request: + branches: [ master, stable-* ] # Declare default permissions as read only. permissions: read-all jobs: - validation: - name: "Validation" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 - - uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1 + validation: + name: "Validation" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + - uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1 diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index c28bc95b5..534818a13 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -1,40 +1,40 @@ name: "QA" on: - pull_request: - branches: [ master, stable-* ] + pull_request: + branches: [ master, stable-* ] permissions: - pull-requests: write - contents: read + pull-requests: write + contents: read jobs: - qa: - runs-on: ubuntu-latest - steps: - - name: Check if secrets are available - run: echo "::set-output name=ok::${{ secrets.KS_PASS != '' }}" - id: check-secrets - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - - name: set up JDK 11 - uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3 - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - with: - distribution: "temurin" - java-version: 11 - - name: Build QA - if: ${{ steps.check-secrets.outputs.ok == 'true' }} - env: - KS_PASS: ${{ secrets.KS_PASS }} - KEY_PASS: ${{ secrets.KEY_PASS }} - LOG_USERNAME: ${{ secrets.LOG_USERNAME }} - LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }} - run: | - mkdir -p $HOME/.gradle - echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties - sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" app/build.gradle - sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" app/build.gradle - ./gradlew assembleQaDebug - $(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:$KS_PASS --key-pass pass:$KEY_PASS --ks-key-alias key0 --ks scripts/QA_keystore.jks app/build/outputs/apk/qa/debug/app-qa-*.apk - sudo scripts/uploadArtifact.sh $LOG_USERNAME $LOG_PASSWORD ${{github.event.number}} ${{github.event.number}} ${{ secrets.GITHUB_TOKEN }} + qa: + runs-on: ubuntu-latest + steps: + - name: Check if secrets are available + run: echo "::set-output name=ok::${{ secrets.KS_PASS != '' }}" + id: check-secrets + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + if: ${{ steps.check-secrets.outputs.ok == 'true' }} + - name: set up JDK 11 + uses: actions/setup-java@1df8dbefe2a8cbc99770194893dd902763bee34b # v3 + if: ${{ steps.check-secrets.outputs.ok == 'true' }} + with: + distribution: "temurin" + java-version: 11 + - name: Build QA + if: ${{ steps.check-secrets.outputs.ok == 'true' }} + env: + KS_PASS: ${{ secrets.KS_PASS }} + KEY_PASS: ${{ secrets.KEY_PASS }} + LOG_USERNAME: ${{ secrets.LOG_USERNAME }} + LOG_PASSWORD: ${{ secrets.LOG_PASSWORD }} + run: | + mkdir -p $HOME/.gradle + echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties + sed -i "/qa/,/\}/ s/versionCode .*/versionCode ${{github.event.number}} /" app/build.gradle + sed -i "/qa/,/\}/ s/versionName .*/versionName \"${{github.event.number}}\"/" app/build.gradle + ./gradlew assembleQaDebug + $(find /usr/local/lib/android/sdk/build-tools/*/apksigner | sort | tail -n1) sign --ks-pass pass:$KS_PASS --key-pass pass:$KEY_PASS --ks-key-alias key0 --ks scripts/QA_keystore.jks app/build/outputs/apk/qa/debug/app-qa-*.apk + sudo scripts/uploadArtifact.sh $LOG_USERNAME $LOG_PASSWORD ${{github.event.number}} ${{github.event.number}} ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 09cb471f1..69ac44bef 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -22,7 +22,5 @@ jobs: only-labels: 'bug,needs info' exempt-issue-labels: 'no-stale' stale-issue-message: >- - This bug report did not receive an update in the last 4 weeks. - Please take a look again and update the issue with new details, - otherwise the issue will be automatically closed in 2 weeks. Thank you! + This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you! exempt-all-pr-milestones: true