Skip to content

Commit 1ada3aa

Browse files
authored
chore: only run PR previews when needed (#219)
1 parent ebf8591 commit 1ada3aa

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.github/workflows/pr-preview.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ name: PR Preview
33
on:
44
pull_request_target:
55
types: [opened, synchronize, reopened]
6+
paths:
7+
- "src/**/*.ts"
8+
- "!src/**/*.test.ts"
9+
- "Dockerfile"
10+
- "package.json"
11+
- "pnpm-lock.yaml"
12+
- "tsconfig.json"
613

714
jobs:
815
request-approval:

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
FROM node:24.9.0-slim AS builder
22

3+
# Note: when updating things that go into this Docker image (with COPY or RUN),
4+
# make sure to update the allow-list in the .github/workflows/pr-preview.yml
5+
# workflow `on.pull_request_target.paths` section, so it gets rebuilt when needed.
6+
37
WORKDIR /action
48

59
COPY package.json pnpm-lock.yaml ./

0 commit comments

Comments
 (0)