Catalog PyPI
PACKAGE EXPLORERView in registry

actionlint-py-kjanat

PyPI

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

Versions collected1
Direct dependencies5From release 1.14.0.47
Last observed20 Oct, 18:32 UTC

README

Version 1.14.0.47 documentation

Note: for pre-commit hooks I recommend officially supported hooks: See docs: https://github.com/kjanat/actionlint/blob/main/docs/usage.md#pre-commit

actionlint-py-kjanat

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

This package wraps the kjanat/actionlint fork of actionlint, not the original rhysd/actionlint. It is published to PyPI as actionlint-py-kjanat.

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

Installation

pip install actionlint-py-kjanat

Usage

After installation, the actionlint binary should be available in your environment (or actionlint.exe on windows). Remember to add you Scripts folder to PATH.

As a pre-commit hook

See pre-commit for introduction.

I recommend using officially supported pre-commit hooks from actionlint itself See docs: https://github.com/kjanat/actionlint/blob/main/docs/usage.md#pre-commit

Use this repo if you can not use officially supported hooks (docker, golang, system) and you are fine with python pip wrapper.

Sample .pre-commit-config.yaml using pip as package manager:

- repo: https://github.com/renefritze/actionlint-py-kjanat
  rev: v1.14.0.24
  hooks:
    - id: actionlint
      additional_dependencies: [ pyflakes>=3.0.1, shellcheck-py>=0.9.0.5 ]
      # actionlint has built in support for pyflakes and shellcheck, sadly they will not be auto updated. Check https://pypi.org/project/actionlint-py-kjanat/ for latest version. Alternatively:
      # args: [-shellcheck=/path/shellcheck -pyflakes=/path/pyflakes]
      # note - invalid path in arguments will fail silently

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

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

Alternative methods of running actionlint

As pre-commit hooks

See official docs for pre-commit integration

- repo: https://github.com/kjanat/actionlint
  rev: v1.14.0
  hooks:
    - id: actionlint
    # - id: actionlint-docker
    # - id: actionlint-system

Use as github action step

Use directly in github action, see official docs for github action integration:

name: Lint GitHub Actions workflows
on: [ push, pull_request ]

jobs:
  actionlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: Download actionlint
        id: get_actionlint
        run: bash <(curl https://raw.githubusercontent.com/kjanat/actionlint/main/scripts/download-actionlint.bash)
        shell: bash
      - name: Check workflow files
        run: ${{ steps.get_actionlint.outputs.executable }} -color
        shell: bash

Or using docker:

name: Lint GitHub Actions workflows
on: [ push, pull_request ]

jobs:
  actionlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: Check workflow files
        uses: docker://ghcr.io/kjanat/actionlint:latest
        with:
          args: -color

Development

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

Roadmap

  • Add actionlint hook as docker
    • support shellcheck-py in docker image
    • auto update docker version in .pre-commit-hooks.yaml when using _custom_build/auto_update_main.py
  • add shellcheck-py as dependency (or at least document)
  • 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)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.14.0.4718 Oct 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
kjanat/actionlint

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
renefritze/actionlint-py-kjanat

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:32 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e5489d690c39952421b31bd0d6c88f33ecae31f3789c133eb0feee865087a63e