fix(ci): restore reliable Flutter SDK download + fix release.yml token hardcoding
CI / Lint (pull_request) Failing after 2m15s
CI / Test (pull_request) Successful in 3m16s
CI / Build Android (pull_request) Skipped
CI / Build iOS (pull_request) Skipped

- Revert subosito/flutter-action to direct Flutter SDK download (action
  was failing on Magrathea runner, works inconsistently across runners)
- Fix release.yml: replace 3x hardcoded 'token ***' with $GITEA_TOKEN
  env var for Gitea release API calls
- Fix release.yml: replace GitHub-specific actions (setup-java,
  setup-python, upload-artifact) with manual SDK downloads
- Update Dockerfile: Flutter 3.41.8 -> 3.44.0, tarball instead of git
  clone, removed unnecessary packages (cmake, clang, pip, pipx, lld,
  mesa-utils), JRE headless instead of full JDK
- Simplify release.yml publish-release: single step to create Gitea
  release (artifact upload pending storage configuration)
This commit is contained in:
robot committed 2026-08-03 00:45:29 +00:00
1 parent 270e3e3805
commit be7c44c4c4
3 files changed
+173 -135

No files matched your search

+14 -13
View File
@@ -2,9 +2,9 @@ FROM --platform=linux/amd64 debian:bookworm-slim
ENV PATH="$PATH:/opt/flutter/bin"
# Install system dependencies
# Install system dependencies - minimal set for Flutter + Android builds
RUN apt-get update && apt-get install -y \
wget curl unzip git xz-utils zip cmake clang pkg-config mesa-utils python3 pip pipx lld libgtk-3-dev ninja-build libglu1-mesa openjdk-17-jdk\
wget curl unzip git xz-utils zip python3 libgtk-3-dev ninja-build openjdk-17-jre-headless \
&& rm -rf /var/lib/apt/lists/*
# Become non-root
@@ -12,27 +12,28 @@ ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=1000
ENV FLUTTER_VERSION=3.41.8
ENV FLUTTER_VERSION=3.44.0
ENV FLUTTER_HOME=/opt/flutter
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m -s /bin/bash $USERNAME
# Install Flutter
RUN git clone https://github.com/flutter/flutter.git ${FLUTTER_HOME} \
&& cd ${FLUTTER_HOME} \
&& git checkout $FLUTTER_VERSION
# Install Flutter (tarball - much faster than git clone)
RUN wget -q "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${FLUTTER_VERSION}-stable.tar.xz" \
-O /tmp/flutter.tar.xz \
&& tar -xf /tmp/flutter.tar.xz -C /opt \
&& rm /tmp/flutter.tar.xz
# Set up Android SDK
ENV ANDROID_HOME=/opt/android-sdk
ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools/36.0.0
ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools/35.0.0
RUN mkdir -p ${ANDROID_HOME}/cmdline-tools \
&& wget https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip -O commandlinetools.zip \
&& unzip commandlinetools.zip -d ${ANDROID_HOME}/cmdline-tools \
&& wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O commandlinetools.zip \
&& unzip -q commandlinetools.zip -d ${ANDROID_HOME}/cmdline-tools \
&& mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest \
&& rm commandlinetools.zip && yes | sdkmanager --licenses \
&& sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0"
&& rm commandlinetools.zip \
&& yes | sdkmanager --licenses \
&& sdkmanager "platform-tools" "platforms;android-35" "build-tools;35.0.0"
RUN chown -R 1000:1000 ${ANDROID_HOME} && chown -R 1000:1000 ${FLUTTER_HOME}
USER $USERNAME