Skip to content

Commit

Permalink
Prevent duplicate workflow runs on PRs (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
haroldadmin authored Apr 5, 2024
1 parent 28ec32e commit 38deb67
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Build

on:
- push
- pull_request
push:
branches:
- "main"

jobs:
build:
Expand All @@ -15,5 +16,5 @@ jobs:
node-version: 20.x
cache: "npm"
- run: npm ci
- run: npm run build --if-present
- run: npm run build
- run: npm test
18 changes: 18 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build

on:
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"
- run: npm ci
- run: npm run build
- run: npm test

0 comments on commit 38deb67

Please sign in to comment.