Skip to content

Commit f252386

Browse files
committed
skip build steps if only ignored files are changed
1 parent 4b285cb commit f252386

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/pr-deploy.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,46 @@ jobs:
127127
ref: ${{ env.PR_BRANCH }}
128128
fetch-depth: 0
129129

130+
- name: check changed files
131+
uses: dorny/paths-filter@v2
132+
id: filter
133+
with:
134+
filters: |
135+
all:
136+
- "**"
137+
ignored:
138+
- "docs/**"
139+
- "README.md"
140+
- "examples/web-server/**"
141+
- "examples/monitoring/**"
142+
- "examples/lima/**"
143+
- "scripts/helm.sh"
144+
- ".github/actions/**"
145+
- ".github/workflows/**"
146+
- "offlinedocs/**"
147+
130148
- name: Setup Node
149+
if: steps.filter.outputs.all_count == steps.filter.outputs.ignored_count
131150
uses: ./.github/actions/setup-node
132151

133152
- name: Setup Go
153+
if: steps.filter.outputs.all_count == steps.filter.outputs.ignored_count
134154
uses: ./.github/actions/setup-go
135155

136156
- name: Setup sqlc
157+
if: steps.filter.outputs.all_count == steps.filter.outputs.ignored_count
137158
uses: ./.github/actions/setup-sqlc
138159

139160
- name: GHCR Login
161+
if: steps.filter.outputs.all_count == steps.filter.outputs.ignored_count
140162
uses: docker/login-action@v2
141163
with:
142164
registry: ghcr.io
143165
username: ${{ github.actor }}
144166
password: ${{ secrets.GITHUB_TOKEN }}
145167

146168
- name: Build and push Linux amd64 Docker image
169+
if: steps.filter.outputs.all_count == steps.filter.outputs.ignored_count
147170
run: |
148171
set -euxo pipefail
149172
go mod download

0 commit comments

Comments
 (0)