Skip to content

ci: use the shared lint and nix workflows - #405

Merged
furedea merged 2 commits into
mainfrom
ci/use-shared-lint-workflows
Nov 8, 2026
Merged

furedea merged 2 commits into
mainfrom
ci/use-shared-lint-workflows

Conversation

@furedea

@furedea furedea commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

GitHub Actions の lint(actionlint,zizmor),dependency review,nix lintを,furedea/reusable-workflows v1.1.0 の共有 workflow から呼ぶように変えます.呼んだジョブは all-green の needs に入るので,失敗するとマージできません.CodeQL は workflow をやめ,GitHub の default setup に移します.

項目 今 変更後
共有 workflow の固定 @<sha> # main(main が進むと zizmor の ref-version-mismatch で落ちる) @<sha> # v1.1.0
actionlint / zizmor gha_lint.yml(workflow を変えた PR だけ) ci.yml から gha-lint.yml を呼ぶ(全 PR,all-green に入る)
dependency review dependency_review.yml(all-green の外),または無し ci.yml から dependency-review.yml を呼ぶ.非公開 repo と PR 以外では飛ばして成功扱い
nix lint ci.yml に直接書いたジョブ nix-lint.yml を呼ぶ
flake check repo ごと(無い repo もある) まだ呼ばない.IFD のせいで他の system を評価できないため.furedea/agent-harness#196 で IFD をなくしてから足す
CodeQL codeql.yml(非公開 repo でも動いて失敗する) codeql.yml を消す.public repo は default setup をオンにする(本人が設定)
claude-review / codex-review # main の古い SHA # v1.1.0
  • 呼んだ共有ジョブがすべて成功する
  • all-green が green になる
出典

🤖 Generated with Claude Code

Call gha-lint, dependency-review, nix-lint and nix-check from
furedea/reusable-workflows v1.0.0 and require them in all-green.
Remove the per-repository GitHub Actions lint and dependency review
workflows, move flake checks to the shared nix-check, skip CodeQL on
private repositories, and pin the review workflows to the same release.

Refs furedea/reusable-workflows#6

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 8, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T16:22:12.457987Z 67e12ba Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@furedea

furedea commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Comment thread .github/workflows/ci.yml Outdated
uses: huacnlee/autocorrect-action@bf91ab3904c2908dd8e71312a8a83ed1eb632997 # v2.13.3

gha-lint:
uses: furedea/reusable-workflows/.github/workflows/gha-lint.yml@c1a43f64ed01a49fa05eccbf8a45dcdf0a9385f9 # v1.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: actionlint and zizmor may no longer check templates/*.yml.

The deleted gha_lint.yml checked the workflow templates in two places:

  • actionlint ran on files: .github/workflows/*.yml,templates/*.yml.
  • A setup step copied templates/*.yml into .zizmor-templates/.github/workflows/, because zizmor-action only finds workflows under a .github/workflows path inside the workspace.

This call passes no inputs. A generic shared workflow will usually scan only .github/workflows/. If so, templates/claude.yml, templates/claude_code_review.yml and templates/release_please.yml are no longer linted. These are workflows people copy into other repos, and Renovate bumps them (renovate.json has managerFilePatterns: /^templates/.*\.ya?ml$/), so a bad pin or template-injection issue would not be caught here.

Please check that [email protected] covers templates/. If it doesn't, either pass an input for the extra paths (if it has one) or keep a small local job for the templates.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted as intended. The shared gha-lint does lint templates through its workflow-template-dir input, but this rollout leaves it unset on purpose. #403 removes the stale templates, and the remaining templates/release_please.yml is superseded by the shared release workflow planned in furedea/reusable-workflows#11, after which templates/ holds no workflows. Until then the one template is not linted here.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Review summary: 1 finding, P2. No P0 or P1.

  • P2: templates/*.yml may have lost its actionlint and zizmor checks. The deleted gha_lint.yml linted those files explicitly, but the new call to gha-lint.yml passes no inputs. See the inline comment.

Checked, no problem found:

  • The uses: pins all point to the same v1.0.0 SHA.
  • Each caller job sets permissions and none is broader than needed (gha-lint: actions: read + contents: read; the others: contents: read).
  • The three new jobs are in all-green.needs.
  • The CodeQL if: ${{ !github.event.repository.private }} guard works on push, pull_request and schedule events.
  • Deleting gha_lint.yml leaves nothing that still refers to it.

Not verified: I couldn't read the shared workflows at c1a43f6 from this environment. So I haven't checked:

  • what nix-lint / nix-check actually run, or which files they cover;
  • whether dependency-review, when it skips on push to main or workflow_dispatch, reports success rather than skipped. all-green fails on skipped, so this matters. Please confirm it on the first push to main after merging.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: f6ded7775f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

furedea added a commit to furedea/reusable-workflows that referenced this pull request Nov 8, 2026
… tool version (#16)

## 概要

CI で使うツールを版レベルですべて固定し,使われていない `workflow-template-dir` 入力を削除します.

## 変更内容

### 破壊的変更

- `gha-lint.yml` の `workflow-template-dir` 入力と,それ専用の 3 ステップ(template 用の
actionlint,Stage,template 用の zizmor)を削除しました.呼び出し側で使っている repo
はありません.入力の削除は互換性を壊すため,release-please は v2.0.0 を切ります.

### 版の固定

- 版の文字列ではなく,中身が変わらない形で固定しました.
- actionlint は,`raven-actions/actionlint` が release asset を checksum
検証なしでダウンロードする(asset は差し替えられる)ため,nixpkgs の固定 rev から `nix run`
で実行する形に変えました(`gha-lint.yml`).nixpkgs の actionlint は shellcheck と
pyflakes を同梱しています.`raven-actions/actionlint` と actionlint の Renovate
customManager は削除しました.
- zizmor は `1.32.0` に固定(`gha-lint.yml`).固定済みの `zizmor-action` の SHA に
hash 付きの lockfile があるため,この版で中身まで固定されます.
- `nix-lint.yml` の nixfmt・statix・deadnix と `gha-lint.yml` の actionlint
を,nixpkgs の同一 rev(各ファイルの job env `NIXPKGS_REV`)に固定.
- 全ワークフローの `runs-on: ubuntu-latest` を `ubuntu-24.04` に固定.GitHub は新しい 2
つの LTS を提供する方針で,`ubuntu-latest` の移行告知でも 24.04 への固定が案内されています.
- `ubuntu-26.04` にしなかった理由:固定した actionlint 1.7.12(nixpkgs の rev が提供する版)は
`ubuntu-26.04` を組み込みラベルに持ちません(v1.7.12 の `rule_runner_label.go` で確認).一方
`ubuntu-24.04` は組み込みラベルなので,設定ファイルは不要です.26.04 への移行は
#17 で扱います.
- `renovate.json` に customManagers を追加し,zizmor(github-releases)と
nixpkgs(git-refs,`nixos-unstable`,`nix-lint.yml` と `gha-lint.yml` の 2
ファイルを 1 本の PR で更新)を Renovate が更新するようにしました.
- Nix 本体(`install-nix-action` v31.11.3 → Nix 2.35.4)と Claude
CLI(`claude-code-action` v1.0.268 → Claude CLI 2.1.318)は,固定済みの action
SHA に版が埋め込まれているため,既に exact に固定されています.`install_url` などを足すと action
の版と二重管理になるので,追加していません.action の更新で一緒に上がります.
- README に入力と固定の一覧を反映しました.

## `all-systems` 入力の取り消しについて

commit `7b89507` のメッセージは `nix-check.yml` への `all-systems`
入力の追加を謳っていますが,最後の commit `c9de33e` で取り消しています(force push はしていません).`nix
flake check -L` → `nix flake check --all-systems --no-build` の 2
段は,無条件に実行する元の動作のままです.この PR の最終状態に `all-systems` 入力はありません.

IFD(import-from-derivation)を使う flake は,`--no-build` で外部 system
の出力を評価できず失敗します(furedea/agent-harness#195,furedea/dotfiles#405).対応は
opt-out を設けるのではなく,flake 側で IFD をなくす方針です.追跡は furedea/agent-harness#196
です.

## 確認

- ローカルで `actionlint`(1.7.12,設定ファイルなし)がエラーなしで通ることを確認.
- CI(`all-green`)と `claude-review` / `codex-review` の結果は,この PR で確認します.

Refs: furedea/agent-harness#195, furedea/agent-harness#196,
furedea/dotfiles#405

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: furedea <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Pin every furedea/reusable-workflows call to v1.1.0. Delete
codeql.yml: CodeQL moves to GitHub's default setup, which private
repositories without code scanning never run.
Stop calling nix-check until furedea/agent-harness#196 removes the
import-from-derivation that breaks evaluating other systems.

Refs furedea/reusable-workflows#6

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@furedea

furedea commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Comment thread .github/workflows/ci.yml
uses: huacnlee/autocorrect-action@bf91ab3904c2908dd8e71312a8a83ed1eb632997 # v2.13.3

gha-lint:
uses: furedea/reusable-workflows/.github/workflows/gha-lint.yml@ca7c5f2973a899e209bc60767f434aecbc186bc9 # v1.1.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Lint coverage for templates/*.yml may be lost. The deleted gha_lint.yml ran actionlint on .github/workflows/*.yml,templates/*.yml, and it copied templates/*.yml into .zizmor-templates/.github/workflows/ so zizmor could find them. Those templates (claude.yml, claude_code_review.yml, release_please.yml) are workflows copied into other repos. This call to the shared gha-lint.yml passes no inputs, so unless v1.1.0 looks for templates/ itself, nothing lints them anymore and a broken or insecure template would merge silently. Please check that the shared workflow covers templates/, or pass the paths as an input if it accepts one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same point as the earlier thread on this line. The shared gha-lint v1.1.0 no longer has a template input on purpose: #403 deletes the whole templates/ directory (claude.yml and claude_code_review.yml were stale, release_please.yml is superseded by furedea/reusable-workflows#11), so there is nothing left to lint. #403 merges right after this PR.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Review summary (read-only)

  • P2: The shared gha-lint call may no longer lint templates/*.yml. The deleted gha_lint.yml ran actionlint and zizmor on them explicitly. See the inline comment.

Notes (not findings, because I couldn't read the shared workflows at ca7c5f2 to check):

  • nix-lint used to run deadnix and nixfmt on a hand-picked list of files and skipped nix/packages/. The shared workflow gets no inputs here, so its scope may be different.
  • all-green fails on skipped. On push and workflow_dispatch, the shared dependency-review has to report success, not skipped, as the PR description says it does.

No P0/P1 issues found.

🤖 Generated with Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 67e12ba535

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@furedea
furedea merged commit 44dce2f into main Nov 8, 2026
17 checks passed
@furedea
furedea deleted the ci/use-shared-lint-workflows branch November 8, 2026 16:51
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