Files
archicratie-edition/.gitea/workflows/ci.yml
Archicratia 9a59e9a6cf
Some checks failed
CI / build-and-anchors (push) Failing after 42s
CI / build-and-anchors (pull_request) Failing after 36s
ci: fix shell (dash) by removing pipefail
2026-01-21 18:32:48 +01:00

59 lines
1.4 KiB
YAML

name: CI
on:
push:
pull_request:
jobs:
build-and-anchors:
runs-on: ubuntu-latest
# On garde ton image devcontainers (elle a généralement git, etc.)
container:
image: mcr.microsoft.com/devcontainers/javascript-node:20-bookworm
steps:
- name: Checkout (from Gitea, no external actions)
env:
SERVER_URL: ${{ github.server_url }}
REPOSITORY: ${{ github.repository }}
SHA: ${{ github.sha }}
TOKEN: ${{ secrets.CI_TOKEN }}
run: |
set -eu
echo "Server: $SERVER_URL"
echo "Repo: $REPOSITORY"
echo "SHA: $SHA"
rm -rf .git || true
if [ -n "${TOKEN:-}" ]; then
AUTH="$(printf 'oauth2:%s' "$TOKEN" | base64 | tr -d '\n')"
git -c http.extraHeader="AUTHORIZATION: basic $AUTH" clone "$SERVER_URL/$REPOSITORY.git" .
else
git clone "$SERVER_URL/$REPOSITORY.git" .
fi
git checkout "$SHA"
git status --porcelain=v1
- name: Install deps
run: |
set -eu
npm ci
- name: Inline scripts syntax check
run: |
set -eu
node scripts/check-inline-js.mjs
- name: Build
run: |
set -eu
npm run build
- name: Anchors contract
run: |
set -eu
node scripts/check-anchors.mjs