Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/fix-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@ permissions:
jobs:
attempt-fix:
if: >-
${{ github.event.workflow_run.conclusion == 'failure' &&
${{ github.event.workflow_run.conclusion == 'failure' &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.name != 'Fix CI Failures' }}
runs-on: ubuntu-latest
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.ADMIN_APP_ID }}
private-key: ${{ secrets.ADMIN_APP_PRIVATE_KEY }}

- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0

- name: Install Cursor CLI
Expand All @@ -30,8 +38,8 @@ jobs:

- name: Configure git identity
run: |
git config user.name "Cursor Agent"
git config user.email "cursor-agent@onkernel.com"
git config user.name "kernel-internal[bot]"
git config user.email "260533166+kernel-internal[bot]@users.noreply.github.com"

- name: Setup Go
uses: actions/setup-go@v5
Expand All @@ -41,7 +49,7 @@ jobs:
- name: Fix CI failure
env:
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
BRANCH_PREFIX: ci-fix
run: |
cursor-agent -p "You are operating in a GitHub Actions runner for the Kernel CLI repository.
Expand Down Expand Up @@ -79,7 +87,7 @@ jobs:
- Example format:
\"🔧 CI Fix Available
I've pushed a fix for the CI failure.

👉 Click here to create a PR with the fix\"
- Do NOT include any git merge instructions or manual merge commands
- Only include the compare link (e.g., https://github.com/.../compare/...)
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.ADMIN_APP_ID }}
private-key: ${{ secrets.ADMIN_APP_PRIVATE_KEY }}
repositories: cli,homebrew-tap

- name: Checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -43,5 +51,5 @@ jobs:
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}