5d1449d27e
* chore(ci): use OpenCode app credentials for fixer PRs Mint GitHub App tokens for ci-fixer and issue-fixer so opened PRs trigger CI and can be auto-merged, matching the opencode repo pattern. * chore(ci): app credentials for ci-fixer and model sync only Keep issue-fixer on GITHUB_TOKEN. Use the OpenCode app for ci-fixer and sync-models so their PRs trigger CI. * fix(ci): keep GITHUB_TOKEN for sync issue creation Missing-model issues must be opened with GITHUB_TOKEN so issues.opened does not fire; Issue Fixer is started only via repository_dispatch. Use the app token only when reporting/pushing catalog PRs.
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: "Setup Git Committer"
|
|
description: "Create app token and configure git user"
|
|
inputs:
|
|
opencode-app-id:
|
|
description: "OpenCode GitHub App ID"
|
|
required: true
|
|
opencode-app-secret:
|
|
description: "OpenCode GitHub App private key"
|
|
required: true
|
|
outputs:
|
|
token:
|
|
description: "GitHub App token"
|
|
value: ${{ steps.apptoken.outputs.token }}
|
|
app-slug:
|
|
description: "GitHub App slug"
|
|
value: ${{ steps.apptoken.outputs.app-slug }}
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Create app token
|
|
id: apptoken
|
|
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2
|
|
with:
|
|
app-id: ${{ inputs.opencode-app-id }}
|
|
private-key: ${{ inputs.opencode-app-secret }}
|
|
owner: ${{ github.repository_owner }}
|
|
|
|
- name: Configure git user
|
|
run: |
|
|
slug="${{ steps.apptoken.outputs.app-slug }}"
|
|
git config --global user.name "${slug}[bot]"
|
|
git config --global user.email "${slug}[bot]@users.noreply.github.com"
|
|
shell: bash
|
|
|
|
- name: Clear checkout auth
|
|
run: |
|
|
git config --local --unset-all http.https://github.com/.extraheader || true
|
|
shell: bash
|
|
|
|
- name: Configure git remote
|
|
run: |
|
|
git remote set-url origin https://x-access-token:${{ steps.apptoken.outputs.token }}@github.com/${{ github.repository }}
|
|
shell: bash
|