Skip to content

Commit 4e12916

Browse files
committed
fixup! ci: Add actionlint to pre-commit and workflow
1 parent 86e2a46 commit 4e12916

File tree

5 files changed

+30
-23
lines changed

5 files changed

+30
-23
lines changed

.github/workflows/checks.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
if: always()
8888
run: make kind.delete
8989

90-
lint:
90+
lint-go:
9191
runs-on: ubuntu-22.04
9292
steps:
9393
- name: Check out code
@@ -111,8 +111,8 @@ jobs:
111111
- name: Export golang and golangci-lint versions
112112
id: versions
113113
run: |
114-
echo "golangci-lint=$(devbox run -- golangci-lint version --format short)" >>$GITHUB_OUTPUT
115-
echo "golang=$(devbox run -- go version | grep -o "[[:digit:]]\+.[[:digit:]]\+\(.[[:digit:]]\+\)\?")" >>$GITHUB_OUTPUT
114+
echo "golangci-lint=$(devbox run -- golangci-lint version --format short)" >>"${GITHUB_OUTPUT}"
115+
echo "golang=$(devbox run -- go version | grep -o "[[:digit:]]\+.[[:digit:]]\+\(.[[:digit:]]\+\)\?")" >>"${GITHUB_OUTPUT}"
116116
117117
- name: golangci-lint
118118
uses: reviewdog/action-golangci-lint@v2
@@ -122,6 +122,18 @@ jobs:
122122
golangci_lint_version: v${{ steps.versions.outputs.golangci-lint }}
123123
go_version: v${{ steps.versions.outputs.golang }}
124124

125+
lint-gha:
126+
runs-on: ubuntu-22.04
127+
steps:
128+
- name: Check out code
129+
uses: actions/checkout@v3
130+
131+
- name: actionlint
132+
uses: reviewdog/action-actionlint@v1
133+
with:
134+
fail_on_error: true
135+
reporter: github-pr-review
136+
125137
pre-commit:
126138
runs-on: ubuntu-22.04
127139
steps:
@@ -152,7 +164,7 @@ jobs:
152164
- name: Run pre-commit
153165
run: devbox run -- make pre-commit
154166
env:
155-
SKIP: no-commit-to-branch,golangci-lint
167+
SKIP: no-commit-to-branch,golangci-lint,actionlint-system
156168

157169
lint-test-helm:
158170
runs-on: ubuntu-22.04
@@ -193,7 +205,7 @@ jobs:
193205
name: Create kind cluster
194206
run: |
195207
devbox run -- kind create cluster \
196-
--image=ghcr.io/mesosphere/kind-node:$(kubectl version --output=json --client | gojq --raw-output .clientVersion.gitVersion) \
208+
--image=ghcr.io/mesosphere/kind-node:"$(kubectl version --output=json --client | gojq --raw-output .clientVersion.gitVersion)" \
197209
--name=chart-testing
198210
env:
199211
KUBECONFIG: ct-kind-kubeconfig

.github/workflows/recover-secret.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ repos:
4141
stages: [commit]
4242
- id: end-of-file-fixer
4343
stages: [commit]
44+
- repo: https://github.com/rhysd/actionlint
45+
rev: v1.6.25
46+
hooks:
47+
- id: actionlint-system
48+
stages: [commit]
4449
- repo: https://github.com/jorisroovers/gitlint
4550
rev: v0.19.1
4651
hooks:

devbox.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"gotestsum@latest",
2525
"golines@latest",
2626
"envsubst@latest",
27-
"kubernetes-controller-tools@latest"
27+
"kubernetes-controller-tools@latest",
28+
"actionlint@latest"
2829
],
2930
"shell": {
3031
"init_hook": [

devbox.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{
22
"lockfile_version": "1",
33
"packages": {
4+
"actionlint@latest": {
5+
"last_modified": "2023-06-30T04:44:22Z",
6+
"resolved": "github:NixOS/nixpkgs/3c614fbc76fc152f3e1bc4b2263da6d90adf80fb#actionlint",
7+
"source": "devbox-search",
8+
"version": "1.6.25"
9+
},
410
"chart-testing@latest": {
511
"last_modified": "2023-07-23T03:35:12Z",
612
"resolved": "github:NixOS/nixpkgs/af8cd5ded7735ca1df1a1174864daab75feeb64a#chart-testing",

0 commit comments

Comments
 (0)