diff --git a/.github/workflows/integration-android-template.yml b/.github/workflows/integration-android-template.yml index aca19f235..2028387df 100644 --- a/.github/workflows/integration-android-template.yml +++ b/.github/workflows/integration-android-template.yml @@ -20,6 +20,8 @@ jobs: shell: bash steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - name: Free disk space # The emulator image unpacks to >10 GB. run: | @@ -56,8 +58,10 @@ jobs: chmod +x /tmp/artifacts/hi - name: Resolve APK id: apk + env: + VERSION: ${{ inputs.version }} run: | - case "${{ inputs.version }}" in + case "${VERSION}" in head) echo "url=${GITHUB_WORKSPACE}/tailscale-debug.apk" >> "$GITHUB_OUTPUT" exit 0 ;; @@ -71,7 +75,7 @@ jobs: # Release APKs share a signing key, so unstable can upgrade latest. # The unstable APK can lag a stable patch, and Android refuses # downgrades, so only upgrade from a strictly older stable. - if [ "${{ inputs.version }}" = unstable ]; then + if [ "${VERSION}" = unstable ]; then from=$(apk stable) if printf '%s\n' "${from}" "${file}" | sort -VCu; then echo "upgrade_from=https://pkgs.tailscale.com/stable/${from}" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/test-integration-android.yaml b/.github/workflows/test-integration-android.yaml index db434eb70..f7416ce59 100644 --- a/.github/workflows/test-integration-android.yaml +++ b/.github/workflows/test-integration-android.yaml @@ -6,6 +6,8 @@ on: [pull_request] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +permissions: + contents: read defaults: run: shell: nix develop --fallback --command bash -e {0} @@ -18,6 +20,7 @@ jobs: steps: - uses: actions/checkout@v7.0.1 with: + persist-credentials: false fetch-depth: 2 - name: Get changed files id: changed-files @@ -83,6 +86,8 @@ jobs: shell: bash steps: - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false - name: Free disk space run: sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL - name: Force overlay2 storage driver @@ -121,6 +126,7 @@ jobs: - uses: actions/checkout@v7.0.1 if: steps.cache.outputs.cache-hit != 'true' with: + persist-credentials: false repository: tailscale/tailscale-android ref: ${{ needs.build.outputs.android-sha }} path: tailscale-android @@ -143,14 +149,14 @@ jobs: include: - { version: unstable, api: 33 } - { version: latest, api: 33 } - uses: ./.github/workflows/integration-android-template.yml + uses: $/.github/workflows/integration-android-template.yml with: version: ${{ matrix.version }} api: ${{ matrix.api }} android-head: needs: [build, build-emulator, build-android-head] if: needs.build.outputs.files-changed == 'true' - uses: ./.github/workflows/integration-android-template.yml + uses: $/.github/workflows/integration-android-template.yml with: version: head api: 33