Update shellcheck.yaml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name of the GitHub Actions workflow, shown in the GitHub UI | |
name: YAML Lint | |
# Defines the events that trigger the workflow | |
on: | |
# Trigger the workflow when code is pushed to the repository | |
push: | |
# Defines which branches to monitor | |
branches: | |
- main # Runs the action on pushes to the 'main' branch | |
# Runs only if files matching these paths are changed inside .github/workflows folder | |
paths: | |
- ".github/workflows/**/*.yaml" # Lint files with the '.yaml' extension inside the .github/workflows folder | |
- ".github/workflows/**/*.yml" # Lint files with the '.yml' extension inside the .github/workflows folder | |
# Trigger the workflow on pull requests | |
pull_request: | |
# Defines which branches to monitor for pull requests | |
branches: | |
- main # Runs the action on pull requests targeting the 'main' branch | |
# Runs only if files matching these paths are changed inside .github/workflows folder | |
paths: | |
- ".github/workflows/**/*.yaml" # Lint files with the '.yaml' extension inside the .github/workflows folder | |
- ".github/workflows/**/*.yml" # Lint files with the '.yml' extension inside the .github/workflows folder | |
# Allows manual triggering of the workflow via the GitHub UI | |
workflow_dispatch: | |
# Defines the jobs to be run in the workflow | |
jobs: | |
# Job name, you can reference this in other parts of the workflow | |
lintYamlFiles: | |
# Specifies the runner environment for the job (Ubuntu in this case) | |
runs-on: ubuntu-latest | |
steps: # List of steps to be executed in the job | |
# Step name, shown in the GitHub UI | |
- name: Checkout code | |
# Action to check out the repository’s code, so it can be accessed by subsequent steps | |
uses: actions/checkout@v3 | |
# Step name, shown in the GitHub UI | |
- name: Lint all YAML files in .github/workflows folder | |
# Action to run yamllint on the YAML files inside the .github/workflows folder | |
uses: ibiqlik/action-yamllint@v3 | |
with: # Provides additional configuration to the yamllint action | |
# Lint all YAML files with '.yaml' extension inside the .github/workflows folder | |
file_or_dir: ".github/workflows/**/*.yaml" | |
format: "github" # Specifies the output format to be GitHub-friendly annotations for easier viewing in the GitHub UI | |
# Lint all YML files inside .github/workflows folder | |
- name: Lint all YML files in .github/workflows folder | |
uses: ibiqlik/action-yamllint@v3 | |
with: | |
# Lint all YAML files with '.yml' extension inside the .github/workflows folder | |
file_or_dir: ".github/workflows/**/*.yml" | |
format: "github" # Specifies the output format to be GitHub-friendly annotations for easier viewing in the GitHub UI |