ci: 必須チェック化へ向けて起動条件と結果集約を整理する - #19
Merged
Merged
Conversation
PR では起動条件の paths を外し、changes ジョブ(dorny/paths-filter)の判定を 各ジョブの実行条件へ移す。paths でスキップされたワークフローはチェックが報告されず、 必須チェックが pending のまま残ってマージがブロックされるため。 push(main)側は従来どおり起動条件の paths で絞る。 必須チェックの指定先として ci-gate ジョブを追加する。matrix を含む個別ジョブ名を 保護設定へ列挙すると shard 数の変更で存在しない名前を要求することになり、 マージ不能か無防備のどちらかへ静かに倒れるため、集約した 1 本のみを指定できる形にする。 PR 側のフィルタは push の paths と同義に保ち、.md の除外も維持する。 除外を意図どおり評価する predicate-quantifier: some-with-excludes は最新リリース v4.0.2 へ含まれないため、dorny/paths-filter のみ master のコミットを指す。 リリースへ入り次第タグの SHA へ戻す。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
main のブランチ保護で必須チェックを使えるようにするための CI 側の対応。
変更点
pull_requestトリガpathsを撤去(push(main)側は従来どおりpathsで絞る)changesジョブ(新規)dorny/paths-filterで PR の変更範囲を判定。push では判定せず常にtrueneeds: changes+ifで分岐(対象外の PR ではスキップ)ci-gateジョブ(新規)needs・if: always()で結果を判定。スキップは成功扱い背景
pathsでスキップされたワークフローはチェックが報告されず、必須チェックが pending のまま残ってマージがブロックされる。このため PR 側は常に起動させ、判定をジョブへ降ろしたci-gateの 1 本へ集約したdorny/paths-filterを master のコミットへ固定している理由ソース階層へ README を置く運用を想定し、allowlist からの
.md除外は PR 側でも維持したい。除外を意図どおり評価する
predicate-quantifier: some-with-excludesが最新リリース v4.0.2 へ含まれないため、当該アクションのみ master のコミット(dist ビルド済み)を指す。検証
**/src/**配下のREADME.mdは除外・フィクスチャの.txtは対象・ルート直下のbuild.gradle.kts/gradle.propertiesは対象)マージ後
保護設定(ruleset)の必須チェックには
ci-gateのみを指定する。🤖 Generated with Claude Code