2 Commits
Author SHA1 Message Date
florian 2566371ce9 Fixed issues with Build files for Android and Linux
Build Android Apk / android (release) Successful in 11m25s
Build Linux Application / linux (release) Successful in 4m40s
Publish Docker Image / docker (release) Successful in 14m10s
2026-09-04 21:38:49 +02:00
florian 2751bd8b4c Fixed issues with Build files for Android and Linux
Build Android Apk / android (release) Failing after 11m8s
Build Linux Application / linux (release) Failing after 4m49s
Publish Docker Image / docker (release) Successful in 13m55s
2026-09-01 15:24:41 +02:00
3 changed files with 52 additions and 18 deletions
+28 -9
View File
@@ -29,11 +29,18 @@ jobs:
- name: Checkout
uses: https://github.com/actions/checkout@v4
# The flutter tool runs git inside the workspace, which the container
# user does not own after the checkout.
# The flutter tool runs git inside the workspace and inside its own sdk,
# and git refuses to work in directories it considers to belong to
# somebody else.
- name: Trust the workspace
run: git config --global --add safe.directory '*'
# Everything the flutter download below needs.
- name: Install the download tools
run: |
apt-get update
apt-get install -y --no-install-recommends ca-certificates curl xz-utils
- name: Set up Java
uses: https://github.com/actions/setup-java@v4
with:
@@ -47,12 +54,19 @@ jobs:
- name: Set up the Android sdk
uses: https://github.com/android-actions/setup-android@v3
# `subosito/flutter-action` cannot be used: it caches the sdk through
# `actions/cache@v5`, and the act-runner of this gitea instance only
# supports actions up to node20 ("runs.using ... got node24"). Unpacking
# the official archive does the same thing and pins the version exactly,
# just like `ac_web/Dockerfile` does.
- name: Set up Flutter
uses: https://github.com/subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
run: |
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
| tar -xJ -C /opt
echo "/opt/flutter/bin" >> "$GITHUB_PATH"
- name: Show the flutter version
run: flutter --version
- name: Install dependencies
run: flutter pub get
@@ -75,9 +89,14 @@ jobs:
- name: Name the apk after the release
run: mv build/app/outputs/flutter-apk/app-release.apk ac_web-${{ github.ref_name }}.apk
# Artifacts of v4 need gitea 1.22 or newer, older instances need @v3.
# @v3 on purpose: `upload-artifact@v4` bundles `@actions/artifact` v2,
# which refuses to run as soon as `GITHUB_SERVER_URL` is not github.com
# ("GHESNotSupportedError") -- and on this instance it is the gitea host.
# The check happens in the action itself, before any request, so it
# cannot be fixed on the gitea side. @v3 talks to the older artifact api
# gitea implements and still runs on node20, which the act-runner allows.
- name: Upload the apk
uses: https://github.com/actions/upload-artifact@v4
uses: https://github.com/actions/upload-artifact@v3
with:
name: ac_web-android-${{ github.ref_name }}
# Artifact paths are relative to the repository, not to the
+22 -9
View File
@@ -28,8 +28,9 @@ jobs:
- name: Checkout
uses: https://github.com/actions/checkout@v4
# The flutter tool runs git inside the workspace, which the container
# user does not own after the checkout.
# The flutter tool runs git inside the workspace and inside its own sdk,
# and git refuses to work in directories it considers to belong to
# somebody else.
- name: Trust the workspace
run: git config --global --add safe.directory '*'
@@ -42,12 +43,19 @@ jobs:
libgtk-3-dev liblzma-dev libstdc++-12-dev \
curl unzip xz-utils
# `subosito/flutter-action` cannot be used: it caches the sdk through
# `actions/cache@v5`, and the act-runner of this gitea instance only
# supports actions up to node20 ("runs.using ... got node24"). Unpacking
# the official archive does the same thing and pins the version exactly,
# just like `ac_web/Dockerfile` does.
- name: Set up Flutter
uses: https://github.com/subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
run: |
curl -fsSL "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${{ env.FLUTTER_VERSION }}-stable.tar.xz" \
| tar -xJ -C /opt
echo "/opt/flutter/bin" >> "$GITHUB_PATH"
- name: Show the flutter version
run: flutter --version
- name: Install dependencies
run: flutter pub get
@@ -64,9 +72,14 @@ jobs:
- name: Pack the bundle
run: tar -czf ac_web-linux-x64-${{ github.ref_name }}.tar.gz -C build/linux/x64/release bundle
# Artifacts of v4 need gitea 1.22 or newer, older instances need @v3.
# @v3 on purpose: `upload-artifact@v4` bundles `@actions/artifact` v2,
# which refuses to run as soon as `GITHUB_SERVER_URL` is not github.com
# ("GHESNotSupportedError") -- and on this instance it is the gitea host.
# The check happens in the action itself, before any request, so it
# cannot be fixed on the gitea side. @v3 talks to the older artifact api
# gitea implements and still runs on node20, which the act-runner allows.
- name: Upload the bundle
uses: https://github.com/actions/upload-artifact@v4
uses: https://github.com/actions/upload-artifact@v3
with:
name: ac_web-linux-x64-${{ github.ref_name }}
# Artifact paths are relative to the repository, not to the
+2
View File
@@ -44,8 +44,10 @@ Widget tests run against a mocked backend: build a `MockClient` that answers by
Notes that are easy to get wrong:
- **The act-runner of the gitea instance only supports actions up to `node20`.** Anything newer fails with `The runs.using key in action.yml must be one of: [...], got node24`, which is why the Flutter sdk is unpacked from the official archive instead of through `subosito/flutter-action` (that one caches through `actions/cache@v5`). Check the `runs.using` of an action before adding it.
- The Flutter version is pinned in three places (`FLUTTER_VERSION` in both build workflows, `ARG FLUTTER_VERSION` in `ac_web/Dockerfile`) and must be kept in sync.
- Steps run with `working-directory: ac_web`, but `upload-artifact` paths are relative to the repository root.
- **`actions/upload-artifact` must stay at `@v3`.** `@v4` bundles `@actions/artifact` v2, which aborts with `GHESNotSupportedError` whenever `GITHUB_SERVER_URL` is not `github.com` -- on this instance it is the gitea host, so the check fires before any request and cannot be worked around on the server side. `@v3` uses the older artifact api gitea implements.
- The workflows are read from the tag the release points at, so they have to be committed **before** the release is created.
- Artifacts and the built files carry the tag name (`github.ref_name`); the docker image is pushed as the tag, as `latest` and as the short sha.
- The apk is signed with a debug key, because `android/app/build.gradle.kts` still has no release signing config.