diff options
| author | Albin <albin@mullvad.net> | 2023-08-03 15:35:41 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2023-08-03 15:35:41 +0200 |
| commit | ee9cc04e984e77c83405fd161b35f946adfc538f (patch) | |
| tree | 6238e54a21d8ee7e5917a3f64a6868ddf9b24264 /.github | |
| parent | 28e71efe1c4303e6f665f2ae79b63d25d68b7241 (diff) | |
| parent | 0a2c48a0c24c3c41e339e620c1e8e7b079ffc6e0 (diff) | |
| download | mullvadvpn-ee9cc04e984e77c83405fd161b35f946adfc538f.tar.xz mullvadvpn-ee9cc04e984e77c83405fd161b35f946adfc538f.zip | |
Merge branch 'bump-container-image-jdk-gradle-and-agp-droid-244'
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/android-app.yml | 10 | ||||
| -rw-r--r-- | .github/workflows/android-audit.yml | 41 | ||||
| -rw-r--r-- | .github/workflows/android-kotlin-format-check.yml | 33 |
3 files changed, 76 insertions, 8 deletions
diff --git a/.github/workflows/android-app.yml b/.github/workflows/android-app.yml index c22708f574..406d362455 100644 --- a/.github/workflows/android-app.yml +++ b/.github/workflows/android-app.yml @@ -192,7 +192,7 @@ jobs: - name: Build Android app uses: burrunan/gradle-cache-action@v1 with: - job-id: jdk11 + job-id: jdk17 arguments: assembleDebug gradle-version: wrapper build-root-directory: android @@ -200,7 +200,7 @@ jobs: - name: Run unit tests uses: burrunan/gradle-cache-action@v1 with: - job-id: jdk11 + job-id: jdk17 arguments: testDebugUnitTest gradle-version: wrapper build-root-directory: android @@ -212,7 +212,7 @@ jobs: - name: Run AGP lint uses: burrunan/gradle-cache-action@v1 with: - job-id: jdk11 + job-id: jdk17 arguments: lint gradle-version: wrapper build-root-directory: android @@ -221,7 +221,7 @@ jobs: - name: Assemble instrumented test apk (app) uses: burrunan/gradle-cache-action@v1 with: - job-id: jdk11 + job-id: jdk17 arguments: assembleAndroidTest gradle-version: wrapper build-root-directory: android @@ -230,7 +230,7 @@ jobs: - name: Assemble instrumented test apk (mockapi) uses: burrunan/gradle-cache-action@v1 with: - job-id: jdk11 + job-id: jdk17 arguments: :test:mockapi:assemble gradle-version: wrapper build-root-directory: android diff --git a/.github/workflows/android-audit.yml b/.github/workflows/android-audit.yml index c49090c0ea..5f85461581 100644 --- a/.github/workflows/android-audit.yml +++ b/.github/workflows/android-audit.yml @@ -11,12 +11,47 @@ on: # https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs - cron: '20 6 * * *' workflow_dispatch: + inputs: + override_container_image: + description: Override container image + type: string + required: false jobs: + prepare: + name: Prepare + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Use custom container image if specified + if: ${{ github.event.inputs.override_container_image != '' }} + run: echo "inner_container_image=${{ github.event.inputs.override_container_image }}" + >> $GITHUB_ENV + + - name: Use default container image and resolve digest + if: ${{ github.event.inputs.override_container_image == '' }} + run: | + echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV + + outputs: + container_image: ${{ env.inner_container_image }} + owasp-dependency-check: + needs: prepare runs-on: ubuntu-latest + container: + image: ${{ needs.prepare.outputs.container_image }} steps: + # Fix for HOME path overridden by GH runners when building in containers, see: + # https://github.com/actions/runner/issues/863 + - name: Fix HOME path + run: echo "HOME=/root" >> $GITHUB_ENV + + - name: Set locale + run: echo "LC_ALL=C.UTF-8" >> $GITHUB_ENV + - uses: actions/checkout@v3 + - name: Run gradle audit task - run: |- - cd android - ./gradlew dependencyCheckAnalyze + run: android/gradlew -p android dependencyCheckAnalyze diff --git a/.github/workflows/android-kotlin-format-check.yml b/.github/workflows/android-kotlin-format-check.yml index 5e27fa38ea..4eb6d54a01 100644 --- a/.github/workflows/android-kotlin-format-check.yml +++ b/.github/workflows/android-kotlin-format-check.yml @@ -4,10 +4,43 @@ on: pull_request: paths: [.github/workflows/android-kotlin-format-check.yml, android/**/*.kt] workflow_dispatch: + inputs: + override_container_image: + description: Override container image + type: string + required: false jobs: + prepare: + name: Prepare + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Use custom container image if specified + if: ${{ github.event.inputs.override_container_image != '' }} + run: echo "inner_container_image=${{ github.event.inputs.override_container_image }}" + >> $GITHUB_ENV + + - name: Use default container image and resolve digest + if: ${{ github.event.inputs.override_container_image == '' }} + run: | + echo "inner_container_image=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV + + outputs: + container_image: ${{ env.inner_container_image }} + check-formatting: + needs: prepare runs-on: ubuntu-latest + container: + image: ${{ needs.prepare.outputs.container_image }} steps: + # Fix for HOME path overridden by GH runners when building in containers, see: + # https://github.com/actions/runner/issues/863 + - name: Fix HOME path + run: echo "HOME=/root" >> $GITHUB_ENV + - uses: actions/checkout@v3 - name: Run ktfmt check |
