Skip to content

Commit d3ff0ee

Browse files
committed
ci: only run build pipeline on main
1 parent 89e3976 commit d3ff0ee

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/nodejs.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Build Docker images
2-
on: push
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches:
7+
- main
8+
39
jobs:
410
audit-npm-dependencies:
511
runs-on: ubuntu-latest
@@ -14,10 +20,11 @@ jobs:
1420
cache: "npm"
1521

1622
- name: Audit NPM dependencies
17-
run: npm audit
23+
run: npm audit --only=prod
1824

1925
build-and-push-docker-images:
2026
runs-on: ubuntu-latest
27+
if: ${{ github.ref == 'refs/heads/main' }}
2128
needs: audit-npm-dependencies
2229
steps:
2330
- name: Checkout repository

0 commit comments

Comments
 (0)