Clone from public URL, not GITHUB_SERVER_URL (resolves to localhost in runner)
The Forgejo runner injects GITHUB_SERVER_URL as http://localhost:3002, which is unreachable from inside the job container. Use the public URL instead.
This commit is contained in:
parent
cbb1cf03d6
commit
8bc185f40c
2 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ jobs:
|
||||||
- name: Mirror to GitHub
|
- name: Mirror to GitHub
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
git clone --mirror "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" repo.git
|
git clone --mirror "https://git.breadway.dev/${GITHUB_REPOSITORY}.git" repo.git
|
||||||
cd repo.git
|
cd repo.git
|
||||||
# Mirror only branches and tags (not refs/pull/*, which GitHub rejects);
|
# Mirror only branches and tags (not refs/pull/*, which GitHub rejects);
|
||||||
# --prune deletes GitHub refs that no longer exist on Forgejo.
|
# --prune deletes GitHub refs that no longer exist on Forgejo.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ jobs:
|
||||||
useradd -m builder
|
useradd -m builder
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
|
git clone --branch "${GITHUB_REF_NAME}" --depth 1 \
|
||||||
"${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" /home/builder/src
|
"https://git.breadway.dev/${GITHUB_REPOSITORY}.git" /home/builder/src
|
||||||
cd /home/builder/src
|
cd /home/builder/src
|
||||||
git archive --format=tar.gz --prefix="breadbox-${VERSION}/" HEAD \
|
git archive --format=tar.gz --prefix="breadbox-${VERSION}/" HEAD \
|
||||||
> packaging/arch/breadbox-${VERSION}.tar.gz
|
> packaging/arch/breadbox-${VERSION}.tar.gz
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue