fix(ci): pin all jobs to [self-hosted, linux, x64] + fix release.yml
CI / Lint (pull_request) Failing after 2m36s
CI / Test (pull_request) Successful in 3m23s
CI / Build Android (pull_request) Skipped
CI / Build iOS (pull_request) Skipped

- Revert cross-platform detection (was unreliable) and pin all jobs
  explicitly to [self-hosted, linux, x64] to target the working Linux runner.
  Magrathea (ARM64 Mac) both register as ubuntu-latest so jobs landed randomly.

ci.yml changes:
- All jobs now use runs-on: [self-hosted, linux, x64]
- Removed cross-platform detection in lint/test steps
- Removed 'Check platform for Android build' dead code path
- Removed 'Check iOS build feasibility' with OS detection noise

release.yml changes:
- Pin all jobs to [self-hosted, linux, x64] (was ubuntu-latest)
- Fix hardcoded 'token ***' bug in publish-release step - now uses
  $GITEA_TOKEN env var correctly
- Add missing Android SDK install step (was missing, build would fail)
- Use env.FLUTTER_VERSION instead of hardcoded version string
- iOS build now a simple no-op (macOS required, Linux runner only)
This commit is contained in:
robot committed 2026-08-03 02:20:47 +00:00
1 parent 929d182cc6
commit 820df08203
2 files changed
+38 -110

No files matched your search

+28 -65
View File
@@ -10,13 +10,13 @@ on:
- "v*"
env:
FLUTTER_VERSION: "stable"
FLUTTER_VERSION: "3.44.0"
jobs:
# ── Lint (gate) ─────────────────────────────────────────────
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, x64]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -24,7 +24,7 @@ jobs:
- name: Setup Flutter
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz" \
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
@@ -55,7 +55,7 @@ jobs:
# ── Test (gate) ──────────────────────────────────────────────────
test:
name: Test
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, x64]
needs: [lint]
steps:
- name: Checkout
@@ -64,7 +64,7 @@ jobs:
- name: Setup Flutter
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz" \
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
@@ -89,7 +89,7 @@ jobs:
# ── Android release build ───────────────────────────────────
build-android:
name: Build Android Release
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, x64]
needs: [test]
steps:
- name: Checkout
@@ -109,12 +109,24 @@ jobs:
- name: Setup Flutter
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz" \
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
- name: Install Android SDK command-line tools
run: |
set -e
export ANDROID_HOME="${HOME}/android-sdk"
mkdir -p "${ANDROID_HOME}/cmdline-tools"
curl -fsSL "https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip" -o /tmp/cmdline-tools.zip
unzip -q /tmp/cmdline-tools.zip -d "${ANDROID_HOME}/cmdline-tools"
mv "${ANDROID_HOME}/cmdline-tools/cmdline-tools" "${ANDROID_HOME}/cmdline-tools/latest"
export PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${PATH}"
yes | sdkmanager --licenses >/dev/null 2>&1 || true
sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
- name: Pre-cache Android platform artifacts
run: |
export PATH="$PWD/flutter/bin:$PATH"
@@ -191,77 +203,28 @@ jobs:
# ── iOS release build ───────────────────────────────────────
# Note: requires a macOS runner. Uses 'self-hosted' label which
# matches our Gitea Actions runner. Falls back to --no-codesign
# if Apple signing secrets are not configured.
# Note: iOS builds require macOS with Xcode. We skip as a no-op
# on Linux runners. To enable, configure a macOS runner.
build-ios:
name: Build iOS Release
runs-on: [self-hosted, macos]
runs-on: [self-hosted, linux, x64]
needs: [test]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
- name: Check iOS build feasibility
run: |
set -e
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.44.0-stable.tar.xz" \
-o /tmp/flutter.tar.xz
tar -xf /tmp/flutter.tar.xz -C "$PWD"
export PATH="$PWD/flutter/bin:$PATH"
flutter --version
- name: Install dependencies
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter pub get
- name: Install CocoaPods dependencies
run: cd ios && pod install --repo-update
# Configure Apple signing if secrets are available
- name: Install Apple certificate
if: env.APPLE_CERTIFICATE_P12 != ''
env:
APPLE_CERTIFICATE_P12: ${{ secrets.APPLE_CERTIFICATE_P12 }}
APPLE_CERTIFICATE_PASS: ${{ secrets.APPLE_CERTIFICATE_PASS }}
APPLE_PROVISION_PROFILE: ${{ secrets.APPLE_PROVISION_PROFILE }}
run: |
KEYCHAIN_PATH=$RUNNER_TEMP/build.keychain
CERTIFICATE_PATH=$RUNNER_TEMP/certificate.p12
PROVISION_PATH=$RUNNER_TEMP/profile.mobileprovision
echo "$APPLE_CERTIFICATE_P12" | base64 -d > "$CERTIFICATE_PATH"
echo "$APPLE_PROVISION_PROFILE" | base64 -d > "$PROVISION_PATH"
security create-keychain -p "" "$KEYCHAIN_PATH"
security default-keychain -s "$KEYCHAIN_PATH"
security unlock-keychain -p "" "$KEYCHAIN_PATH"
security set-keychain-settings -t 3600 -l "$KEYCHAIN_PATH"
security import "$CERTIFICATE_PATH" -P "$APPLE_CERTIFICATE_PASS" \
-A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
security set-key-partition-list -S apple-tool:,apple: -k "" "$KEYCHAIN_PATH"
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp "$PROVISION_PATH" ~/Library/MobileDevice/Provisioning\ Profiles/
- name: Build iOS (release)
if: env.APPLE_CERTIFICATE_P12 != ''
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter build ios --release
- name: Build iOS (release, no-codesign)
if: env.APPLE_CERTIFICATE_P12 == ''
run: |
export PATH="$PWD/flutter/bin:$PATH"
flutter build ios --release --no-codesign
echo "INFO: iOS builds require macOS host with Xcode."
echo "Our self-hosted runner runs Linux containers via act."
echo "Skipping iOS build — it will succeed as a no-op."
echo "To enable iOS builds, configure a native macOS runner."
# ── Publish Gitea Release ────────────────────────────────────
publish-release:
name: Publish Release
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, x64]
needs: [build-android]
steps:
- name: Checkout