Skip to content

Commit 28613b6

Browse files
committed
add actionlint to CI
I previously broke the changelog detection script with an incorrectly formatted heredoc. This commit corrects the issue and adds `actionlint` to our CI checks which would have caught this issue ahead of merge. (cherry picked from commit a8658d3)
1 parent 6d6cdad commit 28613b6

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

.github/workflows/changelog.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ jobs:
3030
- name: Fail
3131
if: steps.changed-changelog-files.outputs.any_changed != 'true'
3232
run: |
33-
echo <<EOF
33+
cat <<EOF
3434
No changelog entry detected.
3535
If this PR has user facing changes, ensure that a change log entry as been added via changie. See CONTRIBUTING.md for details.
3636
If this PR does not have user facing changes, label the PR with "no-changelog" through GitHub's UI.
37-
EOF && exit 1
37+
EOF
38+
exit 1

.github/workflows/comment_added.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: install dependencies
3030
env:
3131
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts
32-
run: pip install -r ${SCRIPT_DIR}/requirements.txt
32+
run: pip install -r "${SCRIPT_DIR}"/requirements.txt
3333
- name: install pandoc
3434
run: sudo apt-get update && sudo apt-get install -y pandoc
3535
- name: Add comment to JIRA Issue
@@ -40,4 +40,4 @@ jobs:
4040
ISSUE_URL: ${{ github.event.issue.html_url }}
4141
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4242
ISSUE_COMMENT: ${{ github.event.comment.body }}
43-
run: python ${SCRIPT_DIR}/jira_helper.py UPDATE_COMMENT --verbose -p K8S
43+
run: python "${SCRIPT_DIR}"/jira_helper.py UPDATE_COMMENT --verbose -p K8S

.github/workflows/jira_issue_manage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: install dependencies
3535
env:
3636
SCRIPT_DIR: ${{ github.workspace }}/.github/workflows/scripts
37-
run: pip install -r ${SCRIPT_DIR}/requirements.txt
37+
run: pip install -r "${SCRIPT_DIR}"/requirements.txt
3838
- name: install pandoc
3939
run: sudo apt-get update && sudo apt-get install -y pandoc
4040
- name: Manage JIRA Issue
@@ -49,4 +49,4 @@ jobs:
4949
ISSUE_LABELS: ${{ join(github.event.issue.labels.*.name) }}
5050
ISSUE_STATE: ${{ github.event.issue.state }}
5151
EVENT_NAME: ${{ github.event.action }}
52-
run: python ${SCRIPT_DIR}/jira_helper.py ISSUE --verbose -p K8S
52+
run: python "${SCRIPT_DIR}"/jira_helper.py ISSUE --verbose -p K8S

Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ tasks:
5757
var: MOD
5858
cmd: cd {{.ITEM}} && golangci-lint run --timeout 28m {{.PKG}} {{.CLI_ARGS}}
5959
- ct lint --chart-dirs ./charts --check-version-increment=false --all
60+
- actionlint
6061

6162
lint-fix:
6263
desc: "equivalent to task lint -- --fix"

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
# If the version of the installed binary is important make sure to
4545
# update TestToolVersions.
4646
packages = [
47+
pkgs.actionlint # Github Workflow definition linter https://github.com/rhysd/actionlint
4748
pkgs.applyconfiguration-gen
4849
pkgs.backport
4950
pkgs.buildkite-agent
@@ -75,7 +76,6 @@
7576
pkgs.openssl
7677
pkgs.setup-envtest # Kubernetes provided test utilities
7778
pkgs.yq-go
78-
# pkgs.actionlint # Github Workflow definition linter https://github.com/rhysd/actionlint
7979
# pkgs.gotools
8080
] ++ lib.optionals pkgs.stdenv.isLinux [
8181
pkgs.sysctl # Used to adjust ulimits on linux systems (Namely, CI).

0 commit comments

Comments
 (0)