mirror of
https://github.com/EbookFoundation/free-programming-books.git
synced 2025-09-03 04:32:41 +02:00
build(fpb-lint): linting errors as PR comments (#10618)
Co-authored-by: ImVector <59611597+LuigiImVector@users.noreply.github.com> Co-authored-by: David Ordás <3125580+davorpa@users.noreply.github.com>
This commit is contained in:
23
.github/workflows/fpb-lint.yml
vendored
23
.github/workflows/fpb-lint.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: free-programming-books-lint
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -17,7 +17,20 @@ jobs:
|
||||
with:
|
||||
node-version: '16.x'
|
||||
- run: npm install -g free-programming-books-lint
|
||||
- run: fpb-lint ./books/
|
||||
- run: fpb-lint ./casts/
|
||||
- run: fpb-lint ./courses/
|
||||
- run: fpb-lint ./more/
|
||||
|
||||
- name: Pull Request
|
||||
run: |
|
||||
fpb-lint books casts courses more &> output.log
|
||||
|
||||
- name: Clean output and create artifacts
|
||||
if: always()
|
||||
run: |
|
||||
mkdir -p ./pr
|
||||
echo ${{ github.event.pull_request.html_url }} > ./pr/PRurl
|
||||
cat output.log | sed -E 's:/home/runner/work/free-programming-books/|⚠.+::' | uniq > ./pr/error.log
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: pr
|
||||
path: pr/
|
||||
|
Reference in New Issue
Block a user