forked from TexasInstruments/processor-sdk-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: rstcheck: add a check to catch new issues
Use the delta function with rstcheck to check for any new errors being introduced by a PR. Signed-off-by: Randolph Sapp <[email protected]>
- Loading branch information
1 parent
dcfcfaa
commit c45ef78
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: "rstcheck" | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/texasinstruments/processor-sdk-doc:latest | ||
createOptions: "--entrypoint /bin/sh" | ||
permissions: | ||
contents: read | ||
issues: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run rstcheck | ||
run: | | ||
git config --global --add safe.directory $PWD | ||
bin/delta.sh -a $GITHUB_BASE_REF -b $GITHUB_SHA \ | ||
-- rstcheck -r source/ | ||
echo "new_warnings="$(cat _new-warn.log)""_new-warn.log >> $GITHUB_ENV | ||
- name: Update pr with info | ||
uses: actions/github-script@v7 | ||
if: failure() | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
issue_number: context.issue.number, | ||
repo: context.repo.repo, | ||
body: process.env.new_warnings | ||
}) |