ci: 将 workflow 的 runs-on 改为 internal_docker
All checks were successful
Tests / test (push) Successful in 55s
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:
@@ -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:
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
|
||||
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
@@ -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:
|
||||
|
||||
2
.github/workflows/track-upstream.yml
vendored
2
.github/workflows/track-upstream.yml
vendored
@@ -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:
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user