2020-11-29 23:39:35 +00:00
|
|
|
name: free-programming-books-lint
|
|
|
|
|
2023-10-25 00:57:22 +00:00
|
|
|
on: [pull_request]
|
2020-11-29 23:39:35 +00:00
|
|
|
|
2022-08-11 08:05:58 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-11-29 23:39:35 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-09-11 17:58:39 +00:00
|
|
|
- uses: actions/checkout@v4
|
2020-11-29 23:39:35 +00:00
|
|
|
- name: Use Node.js
|
2023-10-28 23:45:44 +00:00
|
|
|
uses: actions/setup-node@v4
|
2020-11-29 23:39:35 +00:00
|
|
|
with:
|
2021-09-30 17:40:06 +00:00
|
|
|
node-version: '16.x'
|
2020-11-29 23:39:35 +00:00
|
|
|
- run: npm install -g free-programming-books-lint
|
2023-10-25 00:57:22 +00:00
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2024-01-15 17:06:54 +00:00
|
|
|
- uses: actions/upload-artifact@v4
|
2023-10-25 00:57:22 +00:00
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: pr
|
|
|
|
path: pr/
|