mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 00:18:27 +00:00
fix(ci): publishing workflows run only for main (#7875)
* fix(ci): publishing workflows run only for main A workflow_dispatch on any branch ran the ClawHub sync with CLAWHUB_TOKEN and the MCP registry publish with an OIDC token, publishing that branch's skills/ or server.json under heygen-com. Each publishing job now skips unless github.ref is refs/heads/main and checks out the triggering commit without stored credentials. * test: split the main-only publish check into small checks * test: close main-only publishing policy gaps * refactor: separate publishing push filter classification
This commit is contained in:
@@ -19,6 +19,7 @@ env:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
|
||||
@@ -15,6 +15,8 @@ on:
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
# The registry trusts any OIDC token from this repo, so only main may request one.
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
@@ -24,6 +26,9 @@ jobs:
|
||||
MCP_PUBLISHER_VERSION: v1.8.9
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Install cosign
|
||||
uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2
|
||||
|
||||
@@ -32,12 +32,17 @@ permissions:
|
||||
jobs:
|
||||
sync:
|
||||
name: Publish changed skills
|
||||
# A dispatch runs this file from the chosen branch, so only main may reach the token.
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
env:
|
||||
CLAWHUB_DISABLE_TELEMETRY: "1"
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
persist-credentials: false
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user