Skip to content

ci: fix opencode workflow auth setup for branch pushes#188

Merged
Jordonbc merged 1 commit intoDevfrom
codex/fix-opencode-workflow-error
Mar 19, 2026
Merged

ci: fix opencode workflow auth setup for branch pushes#188
Jordonbc merged 1 commit intoDevfrom
codex/fix-opencode-workflow-error

Conversation

@Jordonbc
Copy link
Collaborator

Motivation

  • The opencode workflow was failing to push fix branches with remote: Duplicate header: "Authorization" because the runner kept a persisted git credential while the opencode action also supplied a token.

Description

  • Set persist-credentials: false on the actions/checkout@v6 step and enabled use_github_token: true for both the primary and fallback anomalyco/opencode/github steps in .github/workflows/opencode.yml so the action consistently manages GitHub auth.

Testing

  • Ran git diff --check which reported no issues and committed the change as ci: fix opencode git auth configuration, and the modification is a CI workflow-only fix (no application code changes).

Codex Task

@github-actions
Copy link

Review Summary: Looks good

The changes are correct and address the duplicate Authorization header issue:

  1. persist-credentials: false - Prevents the checkout action from persisting the runner's GitHub token to .git/credentials, which was causing the conflict with the opencode action's own token handling.

  2. use_github_token: true - Tells the opencode action to use its own authentication mechanism, ensuring consistent token management across both primary and fallback steps.

Minor observations:

  • The GITHUB_TOKEN env var on lines 40 and 52 may be redundant if use_github_token: true makes the action self-contained, but it doesn't hurt and provides flexibility.
  • The fix follows the workflow's existing patterns and conventions.

No issues found. This is a clean, targeted CI fix.

New%20session%20-%202026-03-19T05%3A45%3A42.364Z
opencode session  |  github run

@Jordonbc Jordonbc merged commit 7f93679 into Dev Mar 19, 2026
6 checks passed
@Jordonbc Jordonbc deleted the codex/fix-opencode-workflow-error branch March 19, 2026 05:47
@Jordonbc Jordonbc restored the codex/fix-opencode-workflow-error branch March 19, 2026 05:56
@Jordonbc Jordonbc deleted the codex/fix-opencode-workflow-error branch March 19, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant