ci: use app token for remaining automation

This commit is contained in:
Bohdan Triapitsyn
2026-06-10 02:20:05 +03:00
parent e685ef67f0
commit b494dba8ed
4 changed files with 36 additions and 2 deletions
+9
View File
@@ -22,6 +22,13 @@ jobs:
pull-requests: write
issues: write
steps:
- name: Generate bot app token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.OC_REVIEW_APP_ID }}
private-key: ${{ secrets.OC_REVIEW_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v6
with:
@@ -30,6 +37,8 @@ jobs:
- name: Run opencode
uses: anomalyco/opencode/github@latest
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: opencode/gpt-5.2-codex
+9
View File
@@ -22,6 +22,13 @@ jobs:
pull-requests: read
issues: read
steps:
- name: Generate bot app token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.OC_REVIEW_APP_ID }}
private-key: ${{ secrets.OC_REVIEW_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v6
with:
@@ -30,6 +37,8 @@ jobs:
- name: Run opencode
uses: anomalyco/opencode/github@latest
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
with:
model: opencode-go/deepseek-v4-pro
+10 -2
View File
@@ -15,10 +15,18 @@ jobs:
contents: write
issues: write
steps:
- name: Generate bot app token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.OC_REVIEW_APP_ID }}
private-key: ${{ secrets.OC_REVIEW_APP_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 1
token: ${{ steps.app-token.outputs.token }}
- name: Setup Bun
uses: oven-sh/setup-bun@v2
@@ -32,8 +40,8 @@ jobs:
- name: Reproduce issue
env:
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
+8
View File
@@ -13,8 +13,16 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Generate bot app token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.OC_REVIEW_APP_ID }}
private-key: ${{ secrets.OC_REVIEW_APP_PRIVATE_KEY }}
- uses: actions/stale@v10
with:
repo-token: ${{ steps.app-token.outputs.token }}
days-before-stale: 60
days-before-close: 7
stale-issue-label: stale