mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-24 22:26:29 +09:00
.github: bring the Android workflows through zizmor
Read-only token, no persisted checkout credentials, inputs.version through env, template called with $/.
This commit is contained in:
1 parent
7d07d53837
commit
afd2e1b827
2 files changed
+14
-4
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user