ci: stub OIDC endpoint so the integration job runs on fork PRs#9
Merged
Conversation
fork からの PR では GitHub Actions が id-token: write を付与しないため、
Integration mock ジョブが action 内の scripts/auth.sh の OIDC トークン取得で
必ず失敗していた。
統合テストは mock CLI を使い OIDC トークンの値はテスト上参照されない
(run.sh はトークンを使わず、bm-mock はログ出力するだけ) ため、本物の
GitHub OIDC は不要。auth.sh が非空トークンを返して成功すれば十分。
- {"value":"mock-oidc-token"} を返すローカル mock OIDC エンドポイント
(node 製・固定ポート 34567) を起動するステップを追加
- ACTIONS_ID_TOKEN_REQUEST_URL/_TOKEN をジョブ静的 env で mock に向ける
- retry 付き readiness 待ちと if: always() の cleanup ステップを併設
- 不要になった permissions: id-token: write を統合ジョブから削除
本番コード (auth.sh / run.sh / action.yml) は無改修。これで fork PR でも
統合テストがフルに実行される。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
mock sync output |
|
mock sync output |
|
mock sync output |
|
mock sync output |
m-shaka
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景 / 問題
fork からの PR では GitHub Actions が
id-token: writeを付与しないため、Integration mockジョブがaction 内の
scripts/auth.shの OIDC トークン取得で必ず失敗していた(例: #8)。修正方針
統合テストは mock CLI を使い、OIDC トークンの値はテスト上参照されない
(
run.shはトークンを使わず、bm-mockはログ出力するだけ)。よって本物の GitHub OIDC は不要で、auth.shが非空トークンを返して成功すれば十分。変更
auth.sh/run.sh/action.yml)は改修しない。{"value":"mock-oidc-token"}を返すローカル mock OIDC エンドポイント(node 製、
tests/fixtures/mock-oidc-server.js、固定ポート 34567)を起動するステップを追加。ACTIONS_ID_TOKEN_REQUEST_URL/ACTIONS_ID_TOKEN_REQUEST_TOKENをジョブ静的env:で mock に向ける。if: always()の cleanup ステップを併設。permissions: id-token: writeを統合ジョブから削除。効果
影響しないもの
cli-installジョブは本物の registry 認証が必要なため、fork ガードは据え置き(本 PR 対象外)。🤖 Generated with Claude Code