ci: 将 workflow 的 runs-on 改为 internal_docker
All checks were successful
Tests / test (push) Successful in 55s

自托管 Gitea runner 只注册了 internal_docker 标签,ubuntu-latest 会导致 job 永远排队。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-18 14:03:48 +08:00
parent a273d80cf3
commit 0be8c3e3fe
5 changed files with 23 additions and 5 deletions

View File

@@ -16,7 +16,8 @@ on:
jobs:
test:
runs-on: ubuntu-latest
# Self-hosted Gitea runners are registered as internal_docker, not ubuntu-latest.
runs-on: internal_docker
container:
image: node:22.22.1
steps:

View File

@@ -19,7 +19,7 @@ permissions:
jobs:
portable-windows-full:
name: Portable Windows full bundle (Node + OpenClaw pre-installed)
runs-on: ubuntu-latest
runs-on: internal_docker
steps:
- uses: actions/checkout@v4
@@ -224,7 +224,7 @@ jobs:
publish:
name: Publish GitHub Release
needs: [portable-windows-full]
runs-on: ubuntu-latest
runs-on: internal_docker
steps:
- uses: actions/checkout@v4

View File

@@ -12,7 +12,8 @@ on:
jobs:
test:
runs-on: ubuntu-latest
# Self-hosted Gitea runners are registered as internal_docker, not ubuntu-latest.
runs-on: internal_docker
container:
image: node:22.22.1
steps:

View File

@@ -36,7 +36,7 @@ permissions:
jobs:
track:
name: Check upstream & auto-bump
runs-on: ubuntu-latest
runs-on: internal_docker
steps:
- uses: actions/checkout@v4
with:

View File

@@ -30,6 +30,22 @@ test('both copies of the workflow run the same thing', () => {
assert.ok(gitea.some((s) => s.includes('--check')), 'neither copy checks the generated files');
});
test('workflows target the self-hosted runner label', () => {
// Gitea act_runner on our instance registers as internal_docker. ubuntu-latest
// queues forever because no runner claims it.
const workflowPaths = [
['.gitea', 'workflows', 'tests.yml'],
['.github', 'workflows', 'tests.yml'],
['.github', 'workflows', 'release.yml'],
['.github', 'workflows', 'track-upstream.yml'],
];
for (const path of workflowPaths) {
const yaml = read(...path);
assert.match(yaml, /runs-on:\s*internal_docker/, `${path.join('/')} should use internal_docker`);
assert.doesNotMatch(yaml, /runs-on:\s*ubuntu-latest/, `${path.join('/')} still asks for ubuntu-latest`);
}
});
test('the workflow does not depend on a runner fetching setup actions', () => {
// On a self-hosted Gitea, setup-node has to be pulled from GitHub. A node
// container removes one thing that can be missing on a fresh runner.