Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run actionlint as a pre-merge check. #2163

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/promtool/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Promtool
description: Run promtool with the given arguments.

inputs:
args:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint GitHub Actions
on:
push:
paths: ['.github/**']
jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: alphagov/govuk-infrastructure/.github/actions/actionlint@main
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
done

- name: Read Kubernetes version from /kubernetes_version
run: "grep KUBERNETES_VERSION kubernetes_version >> $GITHUB_ENV"
run: |
grep KUBERNETES_VERSION kubernetes_version >> "$GITHUB_ENV"

- name: kubeconform
uses: docker://ghcr.io/yannh/kubeconform:latest-alpine
Expand Down Expand Up @@ -71,12 +72,12 @@
with:
show-progress: false
- name: Run promtool checks
uses: ./.github/actions/promtool

Check failure on line 75 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

file "/bin/sh" does not exist in "/home/runner/work/govuk-helm-charts/govuk-helm-charts/.github/actions/promtool". it is specified at "entrypoint" key in "runs" section in "Promtool" action

Check failure on line 75 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

missing input "args" which is required by action "Promtool" defined at "./.github/actions/promtool". all required inputs are "args"
with:
args: >
check rules $(find charts/monitoring-config/rules -name '*.yaml' \
-not -name '*_tests.yaml')
- name: Run promtool tests
uses: ./.github/actions/promtool

Check failure on line 81 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / actionlint

missing input "args" which is required by action "Promtool" defined at "./.github/actions/promtool". all required inputs are "args"
with:
args: test rules charts/monitoring-config/rules/*_tests.yaml
Loading