Skip to content

ci: pinact を外して GitHub Actions の workflow lockfile に移行する - #104

Merged
bmthd merged 3 commits into
mainfrom
claude/actions-lock
Nov 17, 2026
Merged

bmthd merged 3 commits into
mainfrom
claude/actions-lock

Conversation

@bmthd

@bmthd bmthd commented Nov 14, 2026

Copy link
Copy Markdown
Owner

何を変えるか

GitHub Actions の参照固定を pinact(workflow に SHA を直書き)から、GitHub 公式の workflow lockfile(.github/workflows/actions.lock)に置き換える。pinact はリポジトリ全体から外す。

変更内容

  • workflow: uses: を SHA とバージョンコメントの組から、正確な release tag(actions/checkout@v7.0.1 など)に戻した。どの commit を実行するかは lockfile が決める。
  • CI(quality.yml): pinact のチェックを削除し、Actions lockfile job を追加した。拡張は gh extension install github/gh-actions-lock --pin v0.4.1 で入れ、gh actions-lock --verify を実行する。
  • グローバル git フック: 全リポジトリで staged workflow を SHA に固定していた pinact-staged を削除した。lockfile はリポジトリごとに opt-in するもので、マシン全体のフックが勝手に作るものではないため、移植はしていない。install.sh は再実行時に古い helper を消す。ただし消すのは、マーカーから自分が置いたと分かるものだけ。
  • mise: pinact ツールと mise.lock のエントリ、mise-pins-test.sh の provenance 要件を削除した。代わりに github-cli の postinstall で gh-actions-lock 拡張を入れる。
  • Renovate: Renovate は action を上げる PR の中で actions.lock も再生成するため、不要になった pinDigest ルールを削除した。
  • ドキュメント: docs/supply-chain{,.ja}.md の Action source 節を書き換えた。README は削除したフックに触れていた 2 行をそれぞれ修正し、行数は増やしていない。

⚠ マージ前に必要な作業: actions.lock の生成

作業したクラウド環境からは github/gh-actions-lock をダウンロードできなかったため、lockfile はこの PR にまだ入っていない。このままでは Actions lockfile job が失敗する。ローカルで次を実行して push すること。

gh extension install github/gh-actions-lock   # mise install 後なら導入済み
gh actions-lock
git add .github/workflows && git commit -m "ci: add actions.lock" && git push

gh actions-lock は uses: を書き換えることがある(部分バージョンを完全なタグに絞るなど)ので、diff も確認すること。

検証

  • ShellCheck と bash -n は green。tests/ は statusline-test.sh 以外すべて green。statusline-test.sh は main でも同じように落ちるので、この PR とは無関係。
  • tests/git-hooks-test.sh に、古い helper を消すケースと、他人が置いた同名ファイルを残すケースを追加した。
  • この環境には mise がないため、mise ls / mise lock の確認は CI 任せ。

留意点


Generated by Claude Code

claude and others added 2 commits November 14, 2026 11:14
Workflows go back to exact release tags; the commit each tag resolves to
is meant to be recorded in .github/workflows/actions.lock, generated by
`gh actions-lock`, and a new CI job runs `gh actions-lock --verify`.

pinact is removed everywhere: the CI check, the mise tool and its lock
entry, and the global pre-commit helper that SHA-pinned staged workflows
in every repository. A re-install deletes that helper from machines that
have it, but only when its marker shows setup put it there.

Renovate regenerates actions.lock itself, so the pinDigest rule is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UPEgcrCmartGXXU6TnZrvg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bmthd
bmthd marked this pull request as ready for review November 17, 2026 17:45
# Conflicts:
#	docs/supply-chain.ja.md
#	docs/supply-chain.md
@bmthd
bmthd merged commit 16e75a2 into main Nov 17, 2026
4 checks passed
@bmthd
bmthd deleted the claude/actions-lock branch November 17, 2026 17:57
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