Skip to main content

Python wrapper around invoking actionlint (https://github.com/rhysd/actionlint)

Project description

actionlint-py

A python wrapper to provide a pip-installable actionlint binary.

Internally this package provides a convenient way to download the pre-built actionlint binary for your particular platform.

Installation

pip install actionlint-py

Usage

After installation, the actionlint binary should be available in your environment (or actionlint.exe on windows).

As a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
  rev: v1.6.25.5
  hooks:
    - id: actionlint

Because actionlint-py is available as source distribution, pip build system is set up to fetch binary from (public) github. It might cause problems with corporate proxy. In case of problems try this semi-manual setup:

- repo: local
  hooks:
    - id: actionlint
      name: actionlint
      description: Lint GitHub workflows with actionlint
      additional_dependencies: [ actionlint-py ]
      #additional_dependencies: [actionlint-py==1.6.25.5]
      # safer, but pre-commit autoupdate will not work
      # note: the versioning scheme is different: not "v1.6.25" but "1.6.25.2" (last number is build system version)
      entry: actionlint
      #args: [-ignore "*.set-output. was depracated.*"]
      language: python
      types: [ "yaml" ]
      files: "^.github/workflows/"

Development

Development of wrapper and releasing new version: see README-DEV.md

Roadmap

  • Update tag in readme in github action when releasing new version
  • Upload also binary distribution, not only source distribution
  • Add unit tests to build system

See README-DEV.md for more TODOs.

Won't do unless asked:

  • support all platforms that actionlint supports (like freebsd)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

actionlint_py-1.6.25.8.tar.gz (9.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page