Skip to content

Commit

Permalink
ci: Only check for news entries if src/ changed
Browse files Browse the repository at this point in the history
Signed-off-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
  • Loading branch information
stefmolin authored and godlygeek committed Apr 24, 2023
1 parent 71b9746 commit 704b99a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 21 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/news-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: News entry check
on:
pull_request:
paths:
- "src/**"
types:
- "opened"
- "reopened"
- "synchronize"
- "labeled"
- "unlabeled"

jobs:
news_entry_check:
runs-on: ubuntu-latest
name: Check for news entry
steps:
- name: "Check for news entry"
uses: brettcannon/check-for-changed-files@v1
with:
file-pattern: "news/*.rst"
skip-label: "skip news"
failure-message: "Missing a news file in ${file-pattern}; please add one or apply the ${skip-label} label to the pull request"
36 changes: 15 additions & 21 deletions .github/workflows/sanity-check.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
name: Sanity check
on:
on:
pull_request:
types:
- "opened"
- "reopened"
- "synchronize"
- "labeled"
- "unlabeled"
- "opened"
- "reopened"
- "synchronize"
- "labeled"
- "unlabeled"

jobs:
commits_check_job:
runs-on: ubuntu-latest
name: Commits Check
steps:
- name: Get PR Commits
id: 'get-pr-commits'
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}
- name: "Check for news entry"
uses: brettcannon/check-for-changed-files@v1
with:
file-pattern: "news/*.rst"
skip-label: "skip news"
failure-message: "Missing a news file in ${file-pattern}; please add one or apply the ${skip-label} label to the pull request"
- name: Get PR Commits
id: "get-pr-commits"
uses: tim-actions/get-pr-commits@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: DCO Check
uses: tim-actions/dco@master
with:
commits: ${{ steps.get-pr-commits.outputs.commits }}

0 comments on commit 704b99a

Please sign in to comment.