Skip to content

ci: add PR title conventional commit validation #15

ci: add PR title conventional commit validation

ci: add PR title conventional commit validation #15

Workflow file for this run

name: StructLint
on:
workflow_call:
inputs:
config:
description: "Path to .structlint.yaml config file"
type: string
default: ".structlint.yaml"
path:
description: "Directory to validate"
type: string
default: "."
json-output:
description: "Path to write JSON report"
type: string
default: ""
log-level:
description: "Log level: debug, info, warn, error"
type: string
default: "info"
silent:
description: "Silent mode - only exit code"
type: boolean
default: false
version:
description: "Version of structlint to use"
type: string
default: ""
upload-report:
description: "Upload JSON report as artifact"
type: boolean
default: false
comment-on-pr:
description: "Post validation results as a PR comment"
type: boolean
default: false
secrets:
github_token:

Check failure on line 39 in .github/workflows/structlint.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/structlint.yml

Invalid workflow file

secret name `github_token` within `workflow_call` can not be used since it would collide with system reserved name
description: "GitHub token for PR comments (required if comment-on-pr is true)"
required: false
permissions:
contents: read
pull-requests: write
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: AxeForging/structlint@main
with:
config: ${{ inputs.config }}
path: ${{ inputs.path }}
json-output: ${{ inputs.json-output }}
log-level: ${{ inputs.log-level }}
silent: ${{ inputs.silent }}
version: ${{ inputs.version }}
comment-on-pr: ${{ inputs.comment-on-pr }}
GITHUB_TOKEN: ${{ secrets.github_token || github.token }}
- name: Upload report
if: ${{ inputs.upload-report && inputs.json-output != '' }}
uses: actions/upload-artifact@v4
with:
name: structlint-report
path: ${{ inputs.json-output }}