fix: use git init + fetch checkout to handle non-empty workspace
Some checks failed
CI / Lint, type check, unit tests, coverage (push) Failing after 1m38s
CI / E2E browser tests (push) Failing after 2s

- Replace git clone . with git init + git fetch + git checkout FETCH_HEAD
  Runner pre-creates workspace directory, so git clone . fails
- Use GITHUB_SHA to fetch exact commit, matching original checkout behavior
- Add DOCKER_HOST=tcp://dind:2375 to E2E job step env
This commit is contained in:
Joakim Mörling 2026-05-19 16:32:47 +02:00
parent 076fe1b299
commit b41124b141

View file

@ -13,8 +13,10 @@ jobs:
steps:
- name: Checkout repository
run: |
git clone --depth 1 \
https://x-access-token:${FORGEJO_TOKEN}@srvr.nu/git/jocke/bilhej.git .
git init
git remote add origin https://x-access-token:${FORGEJO_TOKEN}@srvr.nu/git/jocke/bilhej.git
git fetch --depth 1 origin ${GITHUB_SHA}
git checkout FETCH_HEAD
- uses: actions/setup-node@v4
with:
@ -66,10 +68,14 @@ jobs:
steps:
- name: Checkout repository
run: |
git clone --depth 1 \
https://x-access-token:${FORGEJO_TOKEN}@srvr.nu/git/jocke/bilhej.git .
git init
git remote add origin https://x-access-token:${FORGEJO_TOKEN}@srvr.nu/git/jocke/bilhej.git
git fetch --depth 1 origin ${GITHUB_SHA}
git checkout FETCH_HEAD
- name: Run E2E test stack
env:
DOCKER_HOST: tcp://dind:2375
run: |
docker compose \
-f docker-compose.ci.yml \