ci(forgejo): manual git checkout instead of actions/checkout@v4
The cirruslabs/flutter job image has no Node.js, so JS-based actions fail with 'exec: node: not found'. Check out with plain git over the internal forgejo:3000 URL + job token, keeping the workflows Node-free.
This commit is contained in:
parent
4cac56e3bb
commit
b6eae28234
2 changed files with 43 additions and 8 deletions
|
|
@ -1,9 +1,11 @@
|
||||||
# Per-push gate for git.comunes.org (Forgejo Actions): analyze + tests.
|
# Per-push gate for git.comunes.org (Forgejo Actions): analyze + tests.
|
||||||
# Mirrors the local verification gate in docs/design/testing.md. Ported from the
|
# Mirrors the local verification gate in docs/design/testing.md. Flutter pinned
|
||||||
# retired .gitlab-ci.yml. Flutter pinned to the developer toolchain (3.41.9).
|
# to the developer toolchain (3.41.9).
|
||||||
#
|
#
|
||||||
# NOTE: `runs-on` must match a label your Forgejo runner registered with; adjust
|
# NOTE: `runs-on` must match a label your Forgejo runner registered with.
|
||||||
# if the Comunes runner uses something other than `docker`.
|
# We check out with plain git (a `run:` step) instead of actions/checkout@v4:
|
||||||
|
# the cirruslabs/flutter image has no Node.js, and JS-based actions need it
|
||||||
|
# ("exec: node: not found"). Manual checkout keeps the workflow Node-free.
|
||||||
|
|
||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
|
|
@ -18,7 +20,15 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/cirruslabs/flutter:3.41.9
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
git init -q .
|
||||||
|
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
|
||||||
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
||||||
|
git checkout -q FETCH_HEAD
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- run: dart format --output=none --set-exit-if-changed .
|
- run: dart format --output=none --set-exit-if-changed .
|
||||||
- run: flutter analyze
|
- run: flutter analyze
|
||||||
|
|
@ -28,7 +38,15 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/cirruslabs/flutter:3.41.9
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
git init -q .
|
||||||
|
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
|
||||||
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
||||||
|
git checkout -q FETCH_HEAD
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
- name: dart test
|
- name: dart test
|
||||||
working-directory: packages/commons_core
|
working-directory: packages/commons_core
|
||||||
|
|
@ -39,7 +57,15 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/cirruslabs/flutter:3.41.9
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
git init -q .
|
||||||
|
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
|
||||||
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
||||||
|
git checkout -q FETCH_HEAD
|
||||||
# SQLCipher so the "no plaintext at rest" security test actually runs.
|
# SQLCipher so the "no plaintext at rest" security test actually runs.
|
||||||
- run: apt-get update -qq && apt-get install -y -qq libsqlcipher-dev
|
- run: apt-get update -qq && apt-get install -y -qq libsqlcipher-dev
|
||||||
- run: flutter pub get
|
- run: flutter pub get
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,17 @@ jobs:
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/cirruslabs/flutter:3.41.9
|
image: ghcr.io/cirruslabs/flutter:3.41.9
|
||||||
steps:
|
steps:
|
||||||
|
# Manual git checkout (no Node): the flutter image has no node, so JS
|
||||||
|
# actions like actions/checkout@v4 fail with "exec: node: not found".
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
env:
|
||||||
|
TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
git init -q .
|
||||||
|
git remote add origin "http://x-access-token:${TOKEN}@forgejo:3000/${GITHUB_REPOSITORY}.git"
|
||||||
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
||||||
|
git checkout -q FETCH_HEAD
|
||||||
|
|
||||||
- name: Generate code (i18n + Drift)
|
- name: Generate code (i18n + Drift)
|
||||||
working-directory: apps/app_seeds
|
working-directory: apps/app_seeds
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue