ci: add zizmor pre-commit hook and fix issues #460
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check news file | |
on: | |
pull_request: | |
types: [labeled, unlabeled, opened, reopened, synchronize] | |
jobs: | |
check-news-entry: | |
name: news entry | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
# `towncrier check` runs `git diff --name-only origin/main...`, which | |
# needs a non-shallow clone. | |
fetch-depth: 0 | |
- name: Check news entry | |
if: "!contains(github.event.pull_request.labels.*.name, 'skip news')" | |
run: | | |
pipx run towncrier check --compare-with "origin/${BASE_REF}" | |
env: | |
BASE_REF: ${{ github.base_ref }} |