Compare commits

...

2 Commits

Author SHA1 Message Date
92b01a43b2 Merge pull request 'ci: checkout without external actions (no github.com)' (#43) from fix/ci-no-external-actions into master
Some checks failed
CI / build-and-anchors (push) Failing after 39m47s
Reviewed-on: #43
2026-01-21 10:34:37 +01:00
01f41432f0 ci: checkout without external actions (no github.com)
Some checks failed
CI / build-and-anchors (push) Failing after 4m28s
CI / build-and-anchors (pull_request) Failing after 4m24s
2026-01-21 10:33:51 +01:00

View File

@@ -13,14 +13,32 @@ jobs:
image: node:20-bookworm-slim
steps:
- name: Install git (needed by checkout)
- name: Install base tools (git + certs)
run: |
set -e
apt-get update
apt-get install -y --no-install-recommends git ca-certificates
rm -rf /var/lib/apt/lists/*
git --version
- name: Checkout
uses: actions/checkout@v4
- name: Checkout (from Gitea, no external actions)
env:
SERVER: ${{ github.server_url }}
REPO: ${{ github.repository }}
SHA: ${{ github.sha }}
TOKEN: ${{ secrets.CI_TOKEN }}
run: |
set -euo pipefail
if [ -n "${TOKEN:-}" ]; then
AUTH="$(printf "oauth2:%s" "$TOKEN" | base64 | tr -d '\n')"
git -c http.extraHeader="AUTHORIZATION: basic $AUTH" clone "$SERVER/$REPO.git" .
else
echo " CI_TOKEN absent → clone sans auth (repo public ou accès runner déjà OK)."
git clone "$SERVER/$REPO.git" .
fi
git checkout "$SHA"
- name: Install deps
run: npm ci