Compare commits
10 Commits
feat/m2-ap
...
d1caff6b21
| Author | SHA1 | Date | |
|---|---|---|---|
| d1caff6b21 | |||
| 7e13b1166d | |||
| 0e6e92e327 | |||
| 0f94676b27 | |||
| 058004e865 | |||
| cc088df702 | |||
| 92b01a43b2 | |||
| 01f41432f0 | |||
| b6b9855f58 | |||
| 1e894e7a1f |
@@ -10,17 +10,44 @@ jobs:
|
||||
build-and-anchors:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:20-bookworm-slim
|
||||
# Image avec node + git déjà présents -> pas d'APT
|
||||
image: mcr.microsoft.com/devcontainers/javascript-node:20-bookworm
|
||||
# On force root pour pouvoir écrire /etc/resolv.conf (sinon user "node")
|
||||
options: >-
|
||||
--user root
|
||||
--add-host gitea.archicratie.trans-hands.synology.me:192.168.1.20
|
||||
|
||||
steps:
|
||||
- name: Install git (needed by checkout)
|
||||
- name: Force DNS inside job container (DS220+ / act_runner)
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends git ca-certificates
|
||||
git --version
|
||||
set -eu
|
||||
echo "== resolv.conf (before) =="; cat /etc/resolv.conf || true
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
cat > /etc/resolv.conf <<'EOF'
|
||||
nameserver 192.168.1.1
|
||||
nameserver 109.0.66.10
|
||||
options timeout:2 attempts:2
|
||||
EOF
|
||||
|
||||
echo "== resolv.conf (after) =="; cat /etc/resolv.conf
|
||||
node -e 'require("dns").resolve4("deb.debian.org",(e,a)=>console.log("dns",e||a))'
|
||||
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user