Skip to content

feat: add actionlint to CI and pre-commit for workflow validation#89

Merged
tarun-etikala merged 2 commits into
red-hat-data-services:mainfrom
tarun-etikala:feat/actionlint-ci
May 5, 2026
Merged

feat: add actionlint to CI and pre-commit for workflow validation#89
tarun-etikala merged 2 commits into
red-hat-data-services:mainfrom
tarun-etikala:feat/actionlint-ci

Conversation

@tarun-etikala
Copy link
Copy Markdown
Contributor

@tarun-etikala tarun-etikala commented May 4, 2026

Description

Add actionlint to the CI pipeline and pre-commit configuration to validate GitHub Actions workflow files, completing the workflow validation scope of RHAIENG-4067.

Changes:

  • Add actionlint step to the Code Quality CI workflow using SHA-pinned raven-actions/actionlint action (v2.1.2, actionlint binary v1.7.12)
  • Add actionlint hook to .pre-commit-config.yaml with files: ^\.github/workflows/ filter
  • Document actionlint in CONTRIBUTING.md under Pre-commit hooks and Linting sections
  • Remove redundant manual linter instructions from CONTRIBUTING.md (now covered by pre-commit hooks)

Jira Ticket

RHAIENG-4067

Testing

  • make test passes (run from the affected agent directory)
  • Manual testing performed (describe steps below)
  • No testing required (documentation/config change only)

Verified locally:

  • actionlint passes on all existing workflow files with zero violations
  • pre-commit run actionlint --all-files passes
  • Actionlint binary version (1.7.12) is consistent between CI and pre-commit

Checklist

  • I have read CONTRIBUTING.md
  • No .env or secret files are included in this PR
  • All changes are within scope of the linked Jira ticket (if not, explain in Description)

Review Guidance

  • code-quality.yml: actionlint step uses SHA-pinned action with explicit binary version pinned to match pre-commit
  • .pre-commit-config.yaml: actionlint hook only runs when .github/workflows/ files are staged
  • CONTRIBUTING.md: removed redundant manual ruff/markdownlint instructions (pre-commit handles them), added actionlint to Pre-commit hooks section and Linting intro

Related PRs

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds Actionlint to CI and local tooling: the Code Quality workflow now runs an Actionlint step after Markdownlint; .pre-commit-config.yaml adds markdownlint-cli2 and actionlint hooks; CONTRIBUTING.md documents pre-commit behavior and updated local linter instructions (ruff, markdownlint, actionlint).

Changes

Linting Tooling & CI Integration

Layer / File(s) Summary
Pre-commit hook declarations
.pre-commit-config.yaml
Adds DavidAnson/markdownlint-cli2 (rev v0.22.1) with hook markdownlint-cli2 (args: [--fix], language_version: "22.20.0") and adds an actionlint repo entry (rev v1.7.12) with hook scoped to ^\.github/workflows/.
CI Workflow step
.github/workflows/code-quality.yml
In the lint job, inserts an Actionlint step immediately after Markdownlint, invoking raven-actions/actionlint (pinned by commit) and setting with.version: 1.7.12. Markdownlint is unchanged except for an added comment about the bundled markdownlint-cli2 version.
Documentation / Onboarding
CONTRIBUTING.md
Documents that pre-commit will run markdownlint, actionlint, and commit-msg validation on each commit; lists ruff, markdownlint, and actionlint as blocking Code Quality checks; updates local ruff install (uv tool install ruff==0.15.11) and replaces prior npx markdownlint-cli2 examples with references to repo markdownlint config files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding actionlint to CI and pre-commit for workflow validation, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description accurately describes the changeset, detailing the addition of actionlint to CI pipeline, pre-commit configuration, and documentation updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/s label May 4, 2026
@tarun-etikala tarun-etikala force-pushed the feat/actionlint-ci branch 2 times, most recently from 5f9aa0a to 047a830 Compare May 4, 2026 19:36
Add actionlint step to the Code Quality CI workflow using SHA-pinned
raven-actions/actionlint action (v2.1.2, actionlint 1.7.12). Add
actionlint hook to .pre-commit-config.yaml with files filter for
.github/workflows/. Document actionlint in CONTRIBUTING.md under
Pre-commit hooks and Linting sections.

Ref: RHAIENG-4067

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Linting section duplicated install/run instructions already
covered by the Pre-commit hooks section. Replace with a reference
to pre-commit hooks and a config file summary.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@sanafayyaz315 sanafayyaz315 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tarun-etikala tarun-etikala merged commit 49f1245 into red-hat-data-services:main May 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants