Skip to content

[pre-commit.ci] pre-commit autoupdate #513

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #513

Workflow file for this run

---
name: Pull requests
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
jobs:
update-changelog:
runs-on: ubuntu-latest
name: "Pre-commit CI CHANGELOG auto-update"
if: >
(github.event.pull_request.title == '[pre-commit.ci] pre-commit autoupdate') &&
(github.event.action == 'opened')
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: ${{ secrets.PRE_COMMIT_CI_CHANGELOG }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: '**/pyproject.toml'
- name: Install dependencies
run: |
python3 -m pip install 'git+https://github.com/Takishima/pre-commit-changelog-auto-update@v1.0.0'
- name: Run Python script
run: |
python3 -m update_changelog --pr-body "${{ github.event.pull_request.body }}"
- name: Commit changes
id: commit
uses: EndBug/add-and-commit@v9
with:
author_name: github-actions[bot]
author_email: noreply@github.com
message: Update CHANGELOG
changelog:
needs: update-changelog
runs-on: ubuntu-latest
name: CHANGELOG enforcer
if: '!cancelled()'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: 'Skip-Changelog'