25 lines
1.2 KiB
YAML
25 lines
1.2 KiB
YAML
name: Repair Canina Hermes Git route
|
|
on:
|
|
push:
|
|
branches:
|
|
- ops/hermes-git-routing-20261106
|
|
jobs:
|
|
routing:
|
|
runs-on: canina
|
|
steps:
|
|
- name: Apply scoped runtime routing without restart
|
|
env:
|
|
REPAIR_SHA: ${{ github.sha }}
|
|
REPAIR_REF: ${{ github.ref }}
|
|
run: |
|
|
set -eu
|
|
[ "$REPAIR_REF" = refs/heads/ops/hermes-git-routing-20261106 ]
|
|
case "$REPAIR_SHA" in *[!0-9a-f]*|'') exit 2 ;; esac
|
|
[ "${#REPAIR_SHA}" -eq 40 ]
|
|
export http_proxy= https_proxy= HTTP_PROXY= HTTPS_PROXY=
|
|
wget --no-proxy -qO repair.py "https://git.parsaaghayi.ir/parsa/canina/raw/commit/${REPAIR_SHA}/infra/hermes-git-routing/repair.py"
|
|
python3 repair.py
|
|
docker exec -i -u 10000 -e HOME=/opt/data -e HERMES_HOME=/opt/data canina-hermes python3 - --apply < repair.py
|
|
docker exec -u 10000 -e HOME=/opt/data -e HERMES_HOME=/opt/data canina-hermes git ls-remote ssh://git@git.parsaaghayi.ir:222/parsa/canina.git refs/heads/develop
|
|
docker exec -u 10000 -e HOME=/opt/data -e HERMES_HOME=/opt/data canina-hermes git ls-remote canina-gitea:parsa/canina.git refs/heads/develop
|