mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 07:50:13 +00:00
ci(mcp): run the MCP registry publish in the mcp-registry environment (#7966)
This commit is contained in:
@@ -15,8 +15,9 @@ on:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
# The registry trusts any OIDC token from this repo, so only main may request one.
|
||||
# The environment admits only main.
|
||||
if: github.ref == 'refs/heads/main'
|
||||
environment: mcp-registry
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
|
||||
@@ -162,3 +162,17 @@ test("a job that reads a stored secret binds an environment", () => {
|
||||
);
|
||||
assert.deepEqual(unbound, []);
|
||||
});
|
||||
|
||||
test("a job that can request an OIDC token binds an environment", () => {
|
||||
const unbound = workflows.flatMap(({ file, doc }) =>
|
||||
Object.entries(doc.jobs ?? {})
|
||||
.filter(([, job]) => {
|
||||
const permissions = job.permissions ?? doc.permissions ?? {};
|
||||
return (
|
||||
(permissions === "write-all" || permissions["id-token"] === "write") && !job.environment
|
||||
);
|
||||
})
|
||||
.map(([name]) => `${file} ${name}`),
|
||||
);
|
||||
assert.deepEqual(unbound, []);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user