Skip to content

Commit

Permalink
Split changelog workflows to separate logic on when each gets run.
Browse files Browse the repository at this point in the history
Also fix a typo (`path=>paths`).
  • Loading branch information
waylan committed Nov 6, 2023
1 parent 9b06df2 commit bc14d59
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
@@ -1,23 +1,16 @@
name: changelog
name: changelog-enforcer

on:
pull_request:
branches:
- '**'
path:
# Only run if changes were made in markdown/ or the changelog
paths:
# Only run if changes were made in markdown/
- 'markdown/**'
- 'docs/changelog.md'

# permissions:
# pull-requests: write

jobs:
validate:
check-for-entry:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Ensure Changelog Entry Made
uses: dangoslen/changelog-enforcer@v3
with:
Expand All @@ -27,10 +20,3 @@ jobs:
changelog describing the changes you have made. Doing so will help to ensure your contribution is accepted.
Please see the [Contributing Guide](https://python-markdown.github.io/contributing/#changelog) for details.
- name: Validate Changelog
if: success()
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: error
path: docs/changelog.md
20 changes: 20 additions & 0 deletions .github/workflows/changelog-validator.yml
@@ -0,0 +1,20 @@
name: changelog-validator

on:
pull_request:
paths:
# Only run if changes were made to the changelog
- 'docs/changelog.md'

jobs:
validate:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Changelog
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: error
path: docs/changelog.md

0 comments on commit bc14d59

Please sign in to comment.