Skip to content

Conversation

@elithrar
Copy link
Contributor

@elithrar elithrar commented Dec 12, 2025

This PR adds a new use_github_token input to the GitHub Action that allows using GITHUB_TOKEN directly instead of exchanging an OIDC token via api.opencode.ai

Removes the dependency on api.opencode.ai to use opencode github run in CI / headless contexts.

…exchange

Adds a new `use_github_token` input to the GitHub Action that allows
using the built-in GITHUB_TOKEN directly instead of exchanging an OIDC
token via api.opencode.ai for an OpenCode App installation token.

When enabled:
- Skips OIDC token fetch and OpenCode API token exchange
- Uses GITHUB_TOKEN environment variable directly
- Skips git credential configuration (GitHub Actions handles this)
- Skips token revocation (not needed for GITHUB_TOKEN)

This enables self-hosted deployments that don't want to depend on the
OpenCode App or api.opencode.ai. Trade-off: commits appear as
github-actions[bot] instead of opencode-agent[bot].
@elithrar elithrar changed the title feat(github): add use_github_token option to skip OpenCode App token exchange github: support GITHUB_TOKEN + skip OIDC Dec 12, 2025
@rekram1-node
Copy link
Collaborator

/review

@github-actions
Copy link
Contributor

lgtm

@rekram1-node rekram1-node merged commit 613e082 into anomalyco:dev Dec 13, 2025
3 checks passed
@elithrar elithrar deleted the github-support-token-only branch December 13, 2025 02:20
nalin-singh pushed a commit to nalin-singh/opencode that referenced this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants