add linters for GitHub workflows and actions#186
Draft
peng225 wants to merge 6 commits into
Draft
Conversation
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
There was a problem hiding this comment.
Pull request overview
This PR adds CI linting for GitHub Actions workflows/actions and hardens existing workflows by pinning action versions, tightening credentials handling, and adding job timeouts.
Changes:
- Add
actionlint,ghalint, andzizmortooling toversions.mk/Makefile, and introduce a meta workflow to run them on workflow/action changes. - Pin multiple GitHub Actions to commit SHAs, add
timeout-minutes, and reduce credential persistence in workflows. - Update the release workflow scripting and Go toolchain declaration.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
versions.mk |
Adds version pins for zizmor, actionlint, and ghalint. |
Makefile |
Adds install targets for actionlint, ghalint, and zizmor. |
go.mod |
Adds a toolchain directive. |
.github/workflows/stale.yaml |
Pins actions/stale to a commit SHA and adds a job timeout. |
.github/workflows/release.yaml |
Pins checkout/setup-go, adds timeout, and refactors shell usage around versioning and release creation. |
.github/workflows/pr-labeled.yaml |
Adds a job timeout. |
.github/workflows/meta-actions.yml |
New workflow to run actionlint, ghalint, and zizmor on workflow/action changes. |
.github/workflows/main.yaml |
Pins checkout/setup-go and adds a job timeout. |
.github/workflows/helm.yaml |
Pins actions, adds timeout, and adjusts checkout credentials behavior. |
.github/workflows/helm-release.yaml |
Pins actions, adds timeout, and adjusts checkout credentials behavior. |
.github/workflows/e2e.yaml |
Pins checkout/setup-go, adds timeout, and adjusts checkout credentials behavior. |
.github/workflows/create-chart-update-pr.yaml |
Adds timeout, refactors quoting/env handling, pins actions, and adjusts checkout credentials behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Since ghalint v1.5.6 requires go version >= 1.26.2, I set toolchain in go.mod to v1.26.4 (current latest). Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
a94baef to
54e22f2
Compare
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
Signed-off-by: Shinya Hayashi <shinya-hayashi@cybozu.co.jp>
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.
No description provided.