Skip to content

ci: deploy docs via Workers Builds with pnpm workspace #376

ci: deploy docs via Workers Builds with pnpm workspace

ci: deploy docs via Workers Builds with pnpm workspace #376

Workflow file for this run

name: Bonk
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}
cancel-in-progress: false
jobs:
bonk:
if: >-
github.event.sender.type != 'Bot' &&
(contains(github.event.comment.body, '/bonk') || contains(github.event.comment.body, '@ask-bonk')) &&
(
github.event.comment.author_association == 'MEMBER' ||
github.event.comment.author_association == 'COLLABORATOR' ||
github.event.comment.author_association == 'OWNER'
)
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
id-token: write
contents: write
issues: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 1
persist-credentials: false
- name: Build prompt with triggering comment
id: prompt
run: |
{
DELIMITER=$(openssl rand -hex 16)
echo "value<<$DELIMITER"
echo "You were invoked by @${COMMENT_AUTHOR} on ${COMMENT_URL}"
echo ""
echo "Their comment:"
echo '```'
echo "$COMMENT_BODY"
echo '```'
echo ""
echo "This is your task. Read it carefully and act on it."
echo "$DELIMITER"
} >> "$GITHUB_OUTPUT"
env:
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
COMMENT_BODY: ${{ github.event.comment.body }}
COMMENT_URL: ${{ github.event.comment.html_url }}
- name: Run Bonk
uses: ask-bonk/ask-bonk/github@c39e982defd0114385df54e72012a3fc4333c4d4
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_AI_GATEWAY_ACCOUNT_ID }}
CLOUDFLARE_GATEWAY_ID: ${{ secrets.CF_AI_GATEWAY_NAME }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_AI_GATEWAY_TOKEN }}
with:
oidc_base_url: https://ask-bonk.cloudflare-exponent.workers.dev/auth
model: "cloudflare-ai-gateway/anthropic/claude-opus-4-8"
variant: "high"
mentions: "/bonk,@ask-bonk"
permissions: write
token_permissions: NO_PUSH
agent: bonk
opencode_version: 1.15.13 # pin to this version as certain ones cause ProviderInitError issues
prompt: ${{ steps.prompt.outputs.value }}