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

Add actionlint workflow #2915

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
21 changes: 21 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels: []

# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
# Empty array means no configuration variable is allowed.
config-variables: null

# Configuration for file paths. The keys are glob patterns to match to file
# paths relative to the repository root. The values are the configurations for
# the file paths. Note that the path separator is always '/'.
# The following configurations are available.
#
# "ignore" is an array of regular expression patterns. Matched error messages
# are ignored. This is similar to the "-ignore" command line option.
paths:
.github/workflows/ci.yml:
ignore:
- 'file "/bin/sh" does not exist in .+'
- 'missing input "args" which is required by action "Promtool".+'
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: This is an action to access Prometheus Tooling via the promtool command

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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
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 +71,12 @@
with:
show-progress: false
- name: Run promtool checks
uses: ./.github/actions/promtool

Check failure on line 74 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 74 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 80 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