Add CI workflow linting and publish :main image#3
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86f583bc69
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
actionlintandzizmorto the Nix dev shell (flake.nix)mainlint-actionsjob that runsactionlintandzizmorpublish-mainjob that builds and pushesghcr.io/coder/coder-k8s:mainon merges tomainpersist-credentials: false, publish job cache disabled)Validation
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.10zizmor .github/workflows/ci.yaml📋 Implementation Plan
Plan: Publish
:mainimage onmainmerges + add Actions linting (actionlint + zizmor)Context / Why
The request now includes three deliverables in one PR: (1) publish
ghcr.io/coder/coder-k8s:mainon merges tomain, (2) enforce GitHub Actions validation withactionlint, and (3) runzizmorchecks for workflow security issues, while also adding both tools toflake.nixfor reproducible local use. The plan keeps these changes minimal by extending the existingci.yamlworkflow and updating the existing Nix dev shell.Evidence
51ee42b024(workflow baseline):.github/workflows/ci.yamlcurrently only triggers on PRs..github/workflows/release.yamlalready uses GHCR login viadocker/login-action@v3+GITHUB_TOKEN.2afaa89579(release conventions):ghcr.io/coder/coder-k8swithDockerfile.goreleaser.3863c6adc3(Nix tooling):flake.nixprovides tooling viadevShells.<system>.default.packages.pkgs.actionlintandpkgs.zizmorare available in the current nixpkgs input.8231c45f71(CI integration shape):ci.yamlfits the current style andcontents: readpermissions.These findings are sufficient to define concrete edit locations and commands for all requested additions.
Implementation details
Update
flake.nixdev shell toolingdevShells.<system>.default.packagesto include both workflow linters.Extend
.github/workflows/ci.yamltrigger to include mergedmainpushesmainso merge commits run CI:Add workflow lint/security job in
.github/workflows/ci.yamllint-actionsjob for GH Actions validation.actionlintandzizmorin CI to catch syntax/semantic issues and security footguns.contents: read); optionally pass${{ github.token }}to reduce rate-limit risk for metadata lookups.Add main-branch image publish job in
.github/workflows/ci.yamlpublish-mainjob gated on successfultestandlint-actions.pushonrefs/heads/main.release.yaml.coder-k8sbinary before Docker build (required byDockerfile.goreleaser).Validation checklist for the PR
flake.nixevaluates and dev shell exposesactionlint+zizmor.ci.yamlremains valid (actionlintpasses in CI).zizmorruns on PRs and fails on actionable workflow security findings.publish-mainis skipped on PRs and runs only onpushtomain.main, verifyghcr.io/coder/coder-k8s:mainexists.Why this approach (concise)
ci.yamlplus one Nix file.publish-mainwaits for both code tests and workflow lint/security checks.flake.nixmakes local verification match CI expectations.Generated with
mux• Model:openai:gpt-5.3-codex• Thinking:xhigh