fix(ci): use internal LXC IP (10.0.0.4:3000) for git clone and API calls
Some checks failed
Build and Release .deb / build-deb (push) Failing after 2s
Some checks failed
Build and Release .deb / build-deb (push) Failing after 2s
This commit is contained in:
parent
6f4234942f
commit
2c77c4effb
1 changed files with 5 additions and 5 deletions
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git clone "https://x-access-token:${FORGEJO_TOKEN}@git.geronzi.fr/geronzi/full_updater.git" /workspace/repo
|
git clone "http://x-access-token:${FORGEJO_TOKEN}@10.0.0.4:3000/geronzi/full_updater.git" /workspace/repo
|
||||||
cd /workspace/repo
|
cd /workspace/repo
|
||||||
git fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* || true
|
git fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* || true
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ jobs:
|
||||||
# Créer un tag léger pour cette release
|
# Créer un tag léger pour cette release
|
||||||
git config user.email "ci@geronzi.fr"
|
git config user.email "ci@geronzi.fr"
|
||||||
git config user.name "Forgejo CI"
|
git config user.name "Forgejo CI"
|
||||||
git remote set-url origin "https://x-access-token:${FORGEJO_TOKEN}@git.geronzi.fr/geronzi/full_updater.git"
|
git remote set-url origin "http://x-access-token:${FORGEJO_TOKEN}@10.0.0.4:3000/geronzi/full_updater.git"
|
||||||
git tag -a "v${VERSION}" -m "Release v${VERSION}"
|
git tag -a "v${VERSION}" -m "Release v${VERSION}"
|
||||||
git push origin "v${VERSION}" || true
|
git push origin "v${VERSION}" || true
|
||||||
fi
|
fi
|
||||||
|
|
@ -82,16 +82,16 @@ jobs:
|
||||||
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{\"tag_name\": \"${TAG}\", \"name\": \"Release ${TAG}\", \"body\": \"Automated build from main\"}" \
|
-d "{\"tag_name\": \"${TAG}\", \"name\": \"Release ${TAG}\", \"body\": \"Automated build from main\"}" \
|
||||||
"https://git.geronzi.fr/api/v1/repos/geronzi/full_updater/releases" || true
|
"http://10.0.0.4:3000/api/v1/repos/geronzi/full_updater/releases" || true
|
||||||
# Récupérer l'ID de la release
|
# Récupérer l'ID de la release
|
||||||
RELEASE_ID=$(curl -s -H "Authorization: token ${FORGEJO_TOKEN}" \
|
RELEASE_ID=$(curl -s -H "Authorization: token ${FORGEJO_TOKEN}" \
|
||||||
"https://git.geronzi.fr/api/v1/repos/geronzi/full_updater/releases/latest" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))")
|
"http://10.0.0.4:3000/api/v1/repos/geronzi/full_updater/releases/latest" | python3 -c "import sys,json; print(json.load(sys.stdin).get('id',''))")
|
||||||
if [ -n "$RELEASE_ID" ] && [ "$RELEASE_ID" != "None" ]; then
|
if [ -n "$RELEASE_ID" ] && [ "$RELEASE_ID" != "None" ]; then
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
-H "Authorization: token ${FORGEJO_TOKEN}" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary @"${FILE}" \
|
--data-binary @"${FILE}" \
|
||||||
"https://git.geronzi.fr/api/v1/repos/geronzi/full_updater/releases/${RELEASE_ID}/assets?name=$(basename ${FILE})"
|
"http://10.0.0.4:3000/api/v1/repos/geronzi/full_updater/releases/${RELEASE_ID}/assets?name=$(basename ${FILE})"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Store artifact
|
- name: Store artifact
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue