Repository navigation
ci: approval-gated fast path on Blacksmith runners #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # Fast path: run the CI checks and pack the npm packages on Blacksmith | ||
| # runners, outside the shared GitHub-hosted queue. Anyone with write access | ||
| # (people or agents) may start it; nothing runs until Khaliq approves the | ||
| # fast-path environment. | ||
| # npm publishing here uses trusted publishing (OIDC bound to publish.yml), so | ||
| # the fast path does not publish: it packs the @relayflows/* packages with | ||
| # `npm pack` and uploads the tarballs as a workflow artifact. It never | ||
| # publishes to npm, never creates a release and never moves a dist-tag. | ||
| name: fast-path | ||
| run-name: fast-path ${{ inputs.ref }} (${{ inputs.reason }}) | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| ref: | ||
| description: Branch, tag or commit to check (a PR branch is fine) | ||
| required: true | ||
| default: main | ||
| reason: | ||
| description: Why this needs the fast path | ||
| required: true | ||
| permissions: | ||
| contents: read | ||
| concurrency: | ||
| group: fast-path-${{ inputs.ref }} | ||
| cancel-in-progress: false | ||
| env: | ||
| NPM_CONFIG_FUND: false | ||
| jobs: | ||
| test: | ||
| name: Test and typecheck | ||
| environment: fast-path | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 | ||
| outputs: | ||
| sha: ${{ steps.sha.outputs.sha }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.ref }} | ||
| persist-credentials: false | ||
| - id: sha | ||
| run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: npm | ||
| - run: npm ci | ||
| - name: Typecheck | ||
| run: npm run typecheck | ||
| - name: Test | ||
| if: ${{ !cancelled() }} | ||
| run: npm test | ||
|
|
||
| pack: | ||
| needs: test | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ needs.test.outputs.sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: npm | ||
| - run: npm ci | ||
| - name: Build packages | ||
| run: | | ||
| # Primitives first: core imports their built types/dist (same order as publish.yml). | ||
| npm run build --workspace=packages/github-primitive | ||
| npm run build --workspace=packages/slack-primitive | ||
| npm run build --workspace=packages/browser-primitive | ||
| npm run build --workspace=packages/core | ||
| npm run build --workspace=packages/cli | ||
| - name: Pack packages | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p "$GITHUB_WORKSPACE/fast-path-packs" | ||
| for pkg in core cli github-primitive slack-primitive browser-primitive; do | ||
| (cd "packages/$pkg" && npm pack --ignore-scripts --pack-destination "$GITHUB_WORKSPACE/fast-path-packs") | ||
| done | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: npm-packages-${{ needs.test.outputs.sha }} | ||
| path: fast-path-packs/*.tgz | ||
| if-no-files-found: error | ||
| - name: Summary | ||
| env: | ||
| REF: ${{ inputs.ref }} | ||
| SHA: ${{ needs.test.outputs.sha }} | ||
| REASON: ${{ inputs.reason }} | ||
| run: | | ||
| { | ||
| echo "### relayflows fast path" | ||
| echo "- ref: \`$REF\` at \`$SHA\`" | ||
| echo "- reason: $REASON" | ||
| echo "- artifact: \`npm-packages-$SHA\` (not published to npm; trusted publishing is bound to publish.yml)" | ||
| echo "- tarballs:" | ||
| for f in fast-path-packs/*.tgz; do echo " - \`$(basename "$f")\`"; done | ||
| } >> "$GITHUB_STEP_SUMMARY" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm that administrator bypass is intended for the
fast-pathgate, or disable it.The
fast-pathenvironment requires approval fromkhaliqgant. Administrators can still bypass that rule, so they can start the gated test job at.github/workflows/fast-path.yml:31without Khaliq's approval. The PR describes the gate as a requirement. If bypass is not intended, open Settings → Environments → fast-path, clear Allow administrators to bypass configured protection rules, and save. This is a repository setting, so the change has no diff. If bypass is intended, state that in the PR description.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Declining here: the fast-path environment is configured to the rollout spec used across all AgentWorkforce repos (required reviewer khaliqgant, no branch policy). Whether repo admins may bypass environment protection is an org-wide decision for the owner, not something to change per PR; it can be flipped later without a workflow change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rate Limit Exceeded
@khaliqganthave exceeded the limit for the number of chat messages per hour. Please wait 11 minutes and 45 seconds before sending another message.