更新 .gitea/workflows/test.yaml
Some checks failed
Test Runner / test-check (push) Failing after 37s

Signed-off-by: karylab <blisseyblisseyblissey@gmail.com>
This commit is contained in:
2026-01-03 15:24:13 +00:00
parent 6afd4e3e4e
commit 35ca0912ed

View File

@@ -3,10 +3,24 @@ on: [push]
jobs:
test-check:
runs-on: ubuntu-latest # 確保這跟你在方法 1 看到的 Labels 其中一個對應
runs-on: ubuntu-latest
# 手動指定容器連線資訊
container:
image: ubuntu:latest
# 強制讓這個 Job 加入 gitea 的網路 (請替換成你的真實網路名)
options: --network gitea_gitea-net
# 手動設定環境變數
env:
DOCKER_HOST: tcp://docker:2375
steps:
- name: Say Hello
run: echo "Runner 活著!現在時間 $(date)"
run: echo "Testing connection..."
- name: Install Docker CLI (因為 ubuntu 映像檔預設沒有 docker)
run: |
apt-get update && apt-get install -y docker.io
- name: Test Docker Access
run: docker ps # 測試能不能呼叫 DinD
run: docker ps