Skip to content

ansible-actions/j2lint-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Action Jinja2 Linting

Linting Jinja2 files using the j2lint package directly from pypi.

Usage

Example of .github/workflows/j2lint-check.yml

---
name: Jinja2 Linting check

# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
  build:
    name: Jinja2 Linting
    runs-on: ubuntu-latest

    steps:
      - name: Checkout git repo
        uses: actions/checkout@v4
        with:
          submodules: true
          fetch-depth: 0

      - name: Run j2lint
        uses: ansible-actions/[email protected]
        with:
          target: "./"

This will run the command j2lint ./

Variables

name required description example values
target true Target for j2lint ./ or *.j2 or path/to/templates