Files
my-rook-config/.github/workflows/actionlint.yaml
T
Joshua Hoblitt 45b6e10b37 ci: lint GitHub Actions workflows with actionlint
Run actionlint over the workflow files through the `make lint.workflows`
target (added in PR 17795) so the check behaves identically when run
locally and in CI, and narrow the workflow's path filter to the
lint-relevant files.

Add .github/actionlint.yaml to ignore the composite action definitions
under .github/workflows/<name>/action.{yml,yaml}: actionlint only
understands workflow files and otherwise mis-parses composite actions as
malformed workflows.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
(cherry picked from commit 34cc8751cf)
2026-06-23 17:21:08 +00:00

41 lines
879 B
YAML

name: actionlint
on:
push:
tags:
- v*
branches:
- master
- release-*
pull_request:
branches:
- master
- release-*
paths:
- ".github/workflows/**"
- ".github/actionlint.yaml"
- "Makefile"
# cancel the in-progress workflow when PR is refreshed.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
actionlint:
name: actionlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: "1.26"
- name: run actionlint
run: make lint.workflows