Skip to content

Files

Latest commit

2fbcacf · Jun 14, 2025

History

History
87 lines (55 loc) · 2.91 KB

check-workflows-task.md

File metadata and controls

87 lines (55 loc) · 2.91 KB

"Check Workflows" workflow (Task)

Validate the repository's GitHub Actions workflows against the JSON schema.

This is the version of the workflow for projects using the Task task runner tool.

Installation

Workflow

Install the check-workflows-task.yml GitHub Actions workflow to .github/workflows/

Assets

  • .npmrc - npm configuration file.
    • Install to: repository root.
  • Taskfile.yml - workflow validation task.
    • Install to: repository root (or merge into the existing Taskfile.yml).
  • Taskfile.yml - npm tasks.
    • Install to: repository root (or merge into the existing Taskfile.yml).
  • Taskfile.yml - Utility tasks.
    • Install to: repository root (or merge into the existing Taskfile.yml).

Dependencies

The tool dependencies of this workflow are managed by npm.

Add the dependencies by running this command:

npm install --save-dev ajv-cli@^5.0.0 ajv-formats@^3.0.1

Commit the resulting changes to the package.json and package-lock.json files.

Configuration

.gitignore

Add the following to /.gitignore:

/node_modules/

Node.js

Configure the version of Node.js used for development of the project by running the following command from a terminal in the project repository folder:

npm pkg set engines.node=22.x

Readme badge

Markdown badge:

[![Check Workflows status](https://github.com/TODO_REPO_OWNER/TODO_REPO_NAME/actions/workflows/check-workflows-task.yml/badge.svg)](https://github.com/TODO_REPO_OWNER/TODO_REPO_NAME/actions/workflows/check-workflows-task.yml)

Replace the TODO_REPO_OWNER and TODO_REPO_NAME placeholders in the URLs with the final repository owner and name (example).


Asciidoc badge:

image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-workflows-task.yml/badge.svg["Check Workflows status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-workflows-task.yml"]

Define the {repository-owner} and {repository-name} attributes and use them throughout the readme (example).

Commit message

Add CI workflow to validate GitHub Actions workflows

On every push or pull request that affects the repository's GitHub Actions workflows, and periodically, validate them
against the JSON schema.

PR message

On every push or pull request that affects the repository's GitHub Actions workflows, and periodically, validate them against the JSON schema.