Skip to content

Lint GitHub workflows with zizmor - [Update-updater-script #15] by @o-l-a-v #9

Lint GitHub workflows with zizmor - [Update-updater-script #15] by @o-l-a-v

Lint GitHub workflows with zizmor - [Update-updater-script #15] by @o-l-a-v #9

name: Lint GitHub workflows with zizmor
run-name: "${{ github.workflow }} - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
on:
pull_request:
paths:
- .github/workflows/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-workflows:
name: Run zizmor latest via PyPI
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: 🛎️ GitHub checkout branch "${{ github.head_ref || github.ref_name }}"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: 🔍 Get changed files
id: filter
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
filters: |
workflows:
- added|modified: '.github/workflows/**'
list-files: escape
- name: ⬇️ Install the latest version of uv
if: steps.filter.outputs.workflows == 'true'
uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.6.1
- name: 🔍 Run zizmor
if: steps.filter.outputs.workflows == 'true'
run: |
uvx zizmor --format plain --offline --min-confidence low --min-severity low \
${{ steps.filter.outputs.workflows_files }}