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 string.
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:
- context ".+" is not allowed here
- label ".+" is unknown\. available labels are
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 paths. This is a mapping from a file path 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 (its name ending with.yaml
). 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. It is 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