testing workflows #3
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: Changelog Check | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: | |
pull-requests: write | |
issues: write | |
jobs: | |
check-changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check for changelog updates | |
run: | | |
git fetch origin ${{ github.base_ref }} | |
if ! git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "docs/pages/resources/changelog.md"; then | |
echo "no_changelog=true" >> $GITHUB_ENV | |
fi | |
- name: Comment on PR | |
if: env.no_changelog == 'true' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.name, | |
issue_number: context.issue.number, | |
body: '❌ No changelog entry was found. Please add an entry to `docs/pages/resources/changelog.md`.' | |
}) |