Merge pull request #211 from chenrui333/node-20

chore(deps): bump checkout action to v4 and use setup-node to setup node and cache npm deps
This commit is contained in:
Michal Dorner 2024-01-24 15:35:19 +01:00 committed by GitHub
commit a35d8d6a33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 9 deletions

View File

@ -1,4 +1,5 @@
name: "Build"
on:
push:
paths-ignore: [ '*.md' ]
@ -9,7 +10,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: |
npm install
npm run all
@ -17,7 +22,7 @@ jobs:
self-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
id: filter
with:

View File

@ -10,7 +10,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: |
npm install
npm run all
@ -20,7 +24,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
id: filter
with:
@ -41,7 +45,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
id: filter
with:
@ -53,7 +57,7 @@ jobs:
test-without-token:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
id: filter
with:
@ -66,7 +70,7 @@ jobs:
test-wd-without-token:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: somewhere
- uses: ./somewhere
@ -82,7 +86,7 @@ jobs:
test-local-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: echo "NEW FILE" > local
- run: git add local
- uses: ./
@ -102,7 +106,7 @@ jobs:
test-change-type:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: configure GIT user
run: git config user.email "john@nowhere.local" && git config user.name "John Doe"
- name: modify working tree

View File

@ -1,6 +1,9 @@
{
"name": "paths-filter",
"version": "1.0.0",
"engines": {
"node": ">= 20"
},
"private": true,
"description": "Execute your workflow steps only if relevant files are modified.",
"main": "lib/main.js",