mirror of
https://github.com/ipfs/awesome-ipfs.git
synced 2025-01-30 00:03:42 -05:00
feat: cache node_modules and readme
This commit is contained in:
parent
2f9773d707
commit
0ffe703c87
31
.github/workflows/pull_requests.yml
vendored
31
.github/workflows/pull_requests.yml
vendored
@ -7,8 +7,27 @@ on:
|
|||||||
branches: [ master, main ]
|
branches: [ master, main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# Run linting and tests
|
||||||
|
build-and-lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 13
|
||||||
|
- uses: ipfs/aegir/actions/cache-node-modules@master
|
||||||
|
with:
|
||||||
|
directories: |
|
||||||
|
README.md
|
||||||
|
build: |
|
||||||
|
npm run build:readme
|
||||||
|
cache_name: readme
|
||||||
|
# aegir/actions/cache-node-modules runs build. We don't need to run it again.
|
||||||
|
- run: npm run lint
|
||||||
|
|
||||||
update-readme:
|
update-readme:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-and-lint
|
||||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -19,10 +38,13 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 13
|
node-version: 13
|
||||||
- name: Build the readme
|
- uses: ipfs/aegir/actions/cache-node-modules@master
|
||||||
run: |
|
with:
|
||||||
npm install
|
directories: |
|
||||||
npm run build:readme
|
README.md
|
||||||
|
build: |
|
||||||
|
npm run build:readme
|
||||||
|
cache_name: readme
|
||||||
- name: Commit updates to README.md
|
- name: Commit updates to README.md
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
@ -35,6 +57,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
branch: ${{ github.event.pull_request.head.ref }}
|
branch: ${{ github.event.pull_request.head.ref }}
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
run-danger:
|
run-danger:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: update-readme
|
needs: update-readme
|
||||||
|
Loading…
x
Reference in New Issue
Block a user