Skip to content

Commit

Permalink
Merge pull request #211 from chenrui333/node-20
Browse files Browse the repository at this point in the history
chore(deps): bump checkout action to v4 and use setup-node to setup node and cache npm deps
  • Loading branch information
dorny committed Jan 24, 2024
2 parents 3c49e64 + b5a5203 commit a35d8d6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: "Build"

on:
push:
paths-ignore: [ '*.md' ]
Expand All @@ -9,15 +10,19 @@ 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
self-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
id: filter
with:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/pull-request-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,7 +24,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
id: filter
with:
Expand All @@ -41,7 +45,7 @@ jobs:
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
id: filter
with:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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: ./
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit a35d8d6

Please sign in to comment.