--- name: Android - Audit dependencies on: pull_request: paths: - .github/workflows/android-audit.yml - android/gradle/verification-metadata.xml - android/gradle/verification-metadata.keys.xml - android/gradle/verification-keyring.keys - android/scripts/lockfile # libs.versions.toml and *.kts are necessary to ensure that the verification-metadata.xml is up-to-date # with our dependency usage due to the dependency verification not working as expected when keys are # specified for dependencies (DROID-1425). - android/gradle/libs.versions.toml - android/**/*.kts schedule: # At 06:20 UTC every day. # Notifications for scheduled workflows are sent to the user who last modified the cron # syntax in the workflow file. If you update this you must have notifications for # Github Actions enabled, so these don't go unnoticed. # 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 permissions: {} jobs: prepare: name: Prepare runs-on: android-build steps: - name: Checkout repository uses: actions/checkout@v6.0.1 with: submodules: true - 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 }} ensure-clean-lockfile: needs: prepare name: Ensure clean lockfile runs-on: android-build container: image: ${{ needs.prepare.outputs.container_image }} volumes: # node is symlinked in, w/o mounting it, when using a image node won't be found for the # checkout action # https://github.com/NixOS/nixpkgs/issues/306373 - /nix:/nix steps: - uses: actions/checkout@v6.0.1 with: submodules: true # Needed to run git diff later - name: Fix git dir run: git config --global --add safe.directory $(pwd) - name: Re-generate lockfile run: android/scripts/lockfile -u - name: Ensure no changes run: git diff --exit-code verify-lockfile-keys: needs: prepare name: Verify lockfile keys runs-on: android-build container: image: ${{ needs.prepare.outputs.container_image }} volumes: # node is symlinked in, w/o mounting it, when using a image node won't be found for the # checkout action # https://github.com/NixOS/nixpkgs/issues/306373 - /nix:/nix steps: - uses: actions/checkout@v6.0.1 with: submodules: true - name: Verify lockfile keys metadata run: android/scripts/lockfile -v