Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.
/ actions-linter Public archive
generated from actions/typescript-action

Simple linter for GitHub Actions workflow YAML files.

License

Notifications You must be signed in to change notification settings

cschleiden/actions-linter

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Recommendation

At this point I would recommend just using actionlint. Use it as a binary, or via the gh CLI - https://github.com/cschleiden/gh-actionlint. It supports more features and better linting!


Basic GitHub Actions workflow linter

Usage

To lint all workflow files

name: Lint workflows
on:
  pull_request:
    branches:
      - main
      - 'releases/*'

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: cschleiden/actions-linter@v1
        with:
          workflows: '[".github/workflows/*.yaml"]'

Example

Future

The underlying parser does support using GitHub's API to dynamically fetch valid runner labels, action parameters etc. in general, but needs more granular control over the API calls made since the GITHUB_TOKEN doesn't have all of the required permissions. This functionality might be available in a future version, it's currently disabled 🤞.

About

Simple linter for GitHub Actions workflow YAML files.

Resources

License

Stars

Watchers

Forks