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