fix: use git init + fetch checkout to handle non-empty workspace
- 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:
parent
076fe1b299
commit
b41124b141
1 changed files with 10 additions and 4 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Reference in a new issue