ci: update README and CI workflow to improve bird2 job installation process and clarify Docker usage
CI / changes (push) Successful in 5s
CI / go (push) Successful in 19s
CI / openapi (push) Has been skipped
CI / bird2 (push) Failing after 16s

This commit is contained in:
Denozordec
2026-04-04 01:37:44 +07:00
parent 6be46dbbed
commit eddc6b85a0
2 changed files with 11 additions and 7 deletions
+10 -6
View File
@@ -86,12 +86,20 @@ jobs:
needs: [go]
steps:
- uses: actions/checkout@v4
# Вложенный docker + bind-mount ломается, если демон Docker на хосте не видит путь
# workspace runner'а (/workspace/...). bird -p на самом job-раннере надёжнее.
- name: Install bird2
run: |
set -euxo pipefail
if command -v sudo >/dev/null 2>&1; then SUDO=sudo; else SUDO=""; fi
$SUDO apt-get update -qq
DEBIAN_FRONTEND=noninteractive $SUDO apt-get install -y -qq bird2
bird --version
- name: bird -p on all scenario bird.conf files
env:
WORKSPACE: ${{ github.workspace }}
run: |
set -euxo pipefail
# $PWD на act/Gitea runner не всегда корень репозитория; монтируем именно checkout.
WS="${WORKSPACE:-$PWD}"
cd "$WS"
if [ ! -f internal/birdfmt/testdata/scenarios/minimal/bird.conf ]; then
@@ -101,9 +109,5 @@ jobs:
fi
for conf in internal/birdfmt/testdata/scenarios/*/bird.conf; do
echo "==> $conf"
docker run --rm \
-e "BIRD_CONF=/work/${conf}" \
-v "${WS}:/work:ro" \
debian:bookworm-slim \
bash -ceu 'apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq bird2 >/dev/null && bird -c "$BIRD_CONF" -p'
bird -c "$WS/$conf" -p
done