Compare commits
4
Commits
bd5e58d8f4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4fca7d995
|
||
|
|
3ab6169ed4
|
||
|
|
da154648ef
|
||
|
|
9c981036d1
|
@@ -26,7 +26,7 @@ jobs:
|
|||||||
options: --dns 172.16.30.10
|
options: --dns 172.16.30.10
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Select relevant delivery work
|
- name: Select relevant delivery work
|
||||||
id: delivery
|
id: delivery
|
||||||
@@ -38,46 +38,13 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd .
|
cd .
|
||||||
bash scripts/ci-select.sh
|
bash scripts/ci-select.sh
|
||||||
- name: Install Go and Docker CLI if needed
|
- name: Verify governed runner toolchain
|
||||||
if: ${{ steps.delivery.outputs.run == 'true' }}
|
if: ${{ steps.delivery.outputs.run == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
test "$(go version)" = 'go version go1.25.13 linux/amd64'
|
||||||
need_apt=0
|
docker version >/dev/null
|
||||||
need_apk=0
|
|
||||||
if ! command -v go >/dev/null 2>&1 || ! command -v docker >/dev/null 2>&1; then
|
|
||||||
if command -v apt-get >/dev/null 2>&1; then
|
|
||||||
need_apt=1
|
|
||||||
elif command -v apk >/dev/null 2>&1; then
|
|
||||||
need_apk=1
|
|
||||||
else
|
|
||||||
echo "No supported package manager found" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$need_apt" -eq 1 ]; then
|
|
||||||
apt-get update
|
|
||||||
if ! command -v go >/dev/null 2>&1; then
|
|
||||||
apt-get install -y golang-go
|
|
||||||
fi
|
|
||||||
if ! command -v docker >/dev/null 2>&1; then
|
|
||||||
apt-get install -y docker.io curl dnsutils iputils-ping
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$need_apk" -eq 1 ]; then
|
|
||||||
if ! command -v go >/dev/null 2>&1; then
|
|
||||||
apk add --no-cache go
|
|
||||||
fi
|
|
||||||
if ! command -v docker >/dev/null 2>&1; then
|
|
||||||
apk add --no-cache docker-cli curl bind-tools iputils
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
go version
|
|
||||||
docker version
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: ${{ steps.delivery.outputs.run == 'true' }}
|
if: ${{ steps.delivery.outputs.run == 'true' }}
|
||||||
@@ -155,4 +122,4 @@ jobs:
|
|||||||
docker push "$tag"
|
docker push "$tag"
|
||||||
done <<'EOF'
|
done <<'EOF'
|
||||||
${{ steps.meta.outputs.tags }}
|
${{ steps.meta.outputs.tags }}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user