ci: add workflow to enforce updates to the changelog #16
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: "Pull Request Workflow" | |
on: | |
merge_group: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] | |
env: | |
PR_URL: https://github.com/Layr-Labs/eigensdk-rs/pull/${{ github.event.number }} | |
jobs: | |
# Enforces the update of a changelog file on every pull request | |
# We only want this for user-visible changes, so we add a few labels | |
# for which the check is skipped | |
changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dangoslen/changelog-enforcer@v3 | |
with: | |
skipLabels: changelog-ignore | |
- name: Enforce PR URL in CHANGELOG.md | |
if: contains(github.event.pull_request.labels.*.name, 'changelog-ignore') == false | |
run: git diff CHANGELOG.md | grep $PR_URL CHANGELOG.md |