This document describes how to configure actionlint behavior.
Note that configuration file is optional. The author tries to keep configuration file as minimal as possible not to bother users to configure behavior of actionlint. Running actionlint without configuration file would work fine in most cases.
Configuration file actionlint.yaml
or actionlint.yml
can be put in .github
directory.
Note: If you're using Super-Linter, the file should be placed in a different directory. Please check the project's document.
# Configuration related to self-hosted runner.
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
- linux.2xlarge
- windows-latest-xl
- linux-multi-gpu
# Configuration variables in array of strings defined in your repository or organization.
config-variables:
- DEFAULT_RUNNER
- JOB_NAME
- ENVIRONMENT_STAGE
# Path-specific configurations.
paths:
# Glob pattern relative to the repository root for matching files. The path separator is always '/'.
# This example configures any YAML file under the '.github/workflows/' directory.
.github/workflows/**/*.yaml:
# List of regular expressions to filter errors by the error messages.
ignore:
# Ignore the specific error from shellcheck
- 'shellcheck reported issue in this script: SC2086:.+'
# This pattern only matches '.github/workflows/release.yaml' file.
.github/workflows/release.yaml:
ignore:
# Ignore errors from the old runner check. This may be useful for (outdated) self-hosted runner environment.
- 'the runner of ".+" action is too old to run on GitHub Actions'
self-hosted-runner
: Configuration for your self-hosted runner environment.labels
: Label names added to your self-hosted runners as list of pattern. Glob syntax supported bypath.Match
is available.
config-variables
: Configuration variables. When an array is set, actionlint will checkvars
properties strictly. An empty array means no variable is allowed. The default valuenull
disables the check.paths
: Configurations for specific file path patterns. This is a mapping from a glob pattern and the corresponding configuration.{glob}
: A file path glob pattern to apply the configuration. The path separator is always '/'. It is matched to the relative path from the repository root. For example.github/workflows/**/*.yaml
matches all the workflow files (with.yaml
file extension). For the glob syntax, please read the doublestar library's documentation.ignore
: The configuration to ignore (filter) the errors by the error messages. This is an array of regular expressions. When one of the patterns matches the error message, the error will be ignored. It's similar to the-ignore
command line option.
You don't need to write the first configuration file by your hand. actionlint
command can generate a default configuration
with -init-config
flag.
actionlint -init-config
vim .github/actionlint.yaml
Checks | Installation | Usage | Go API | References