Runs shellcheck on GitHub Actions workflow steps
Find a file
2026-05-12 12:57:29 -07:00
.woodpecker woodpecker: Use caching 2026-05-12 12:57:29 -07:00
LICENSES Correct pre-commit failures 2025-02-28 21:03:17 -08:00
.pre-commit-config.yaml pre-commit: Remove actionlint; bump woodpecker-shellcheck 2026-05-04 18:32:10 -07:00
.pre-commit-hooks.yaml Change github.com URLs to codeberg.org 2026-04-29 16:35:52 -07:00
.yamllint.yml Change github.com URLs to codeberg.org 2026-04-29 16:35:52 -07:00
gha-workflow-shellcheck Change github.com URLs to codeberg.org 2026-04-29 16:35:52 -07:00
LICENSE.md Correct pre-commit failures 2025-02-28 21:03:17 -08:00
pyproject.toml Change github.com URLs to codeberg.org 2026-04-29 16:35:52 -07:00
README.md Change github.com URLs to codeberg.org 2026-04-29 16:35:52 -07:00
setup.py Change github.com URLs to codeberg.org 2026-04-29 16:35:52 -07:00
tox.ini SPDX header cleanup 2026-02-17 13:56:10 -08:00

GitHub Actions workflow shellcheck

This software was written for a few hours before I discovered actionlint. My version is functional, but you should probably just use actionlint instead.

This script picks apart run job steps in GitHub Actions workflow files and runs shellcheck on them. It honors the shell attribute and will pass it along to shellcheck. It also turns GitHub context variables such as ${{ matrix.version }} into placeholders such as ${GITHUB_CONTEXT}{{ matrix.version }}. This is so shellcheck doesn't interpret it literally as a shell variable, but still sees a shell variable and hence will detect if, for example, it's within proper shell quoting.

It may be pulled in as a pre-commit hook. It should be tolerant of any YAML file passed to it, not just GitHub Actions workflow files, so it is safe to be registered as types: [yaml] with pre-commit.

repos:
  - repo: "https://codeberg.org/rfinnie/gha-workflow-shellcheck"
    rev: "v0.0.3"
    hooks:
      - id: "gha-workflow-shellcheck"

License

This package is licensed under the terms of the Mozilla Public License v2.0.

This document is provided under the following license:

SPDX-PackageName: gha-workflow-shellcheck
SPDX-PackageSupplier: Ryan Finnie <ryan@finnie.org>
SPDX-PackageDownloadLocation: https://codeberg.org/rfinnie/gha-workflow-shellcheck
SPDX-FileCopyrightText: © 2025 Ryan Finnie <ryan@finnie.org>
SPDX-License-Identifier: CC-BY-SA-4.0