Skip to content

Commit de28dca

Browse files
committed
chore: only build the container when needed
Replaced broad glob patterns with specific source code and configuration paths. This ensured the workflow only triggered on changes relevant to the container image build process. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
1 parent 0127492 commit de28dca

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/container.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,23 @@ name: Create and publish a Docker image to ghcr on main and nightly with ko
33
on:
44
push:
55
paths:
6-
- "**.go"
7-
- "**.yaml"
6+
- "cmd/**"
7+
- "pkg/**"
8+
- "vendor/**"
9+
- "go.mod"
10+
- "go.sum"
11+
- ".ko.yaml"
12+
- ".github/workflows/container.yaml"
813
# For testing when pushing to the main repo directly on pr
914
# pull_request:
1015
# paths:
11-
# - "**.go"
12-
# - "**.yaml"
16+
# - "cmd/**"
17+
# - "pkg/**"
18+
# - "vendor/**"
19+
# - "go.mod"
20+
# - "go.sum"
21+
# - ".ko.yaml"
22+
# - ".github/workflows/container.yaml"
1323
env:
1424
PLATFORMS: linux/amd64,linux/arm64,linux/ppc64le
1525

0 commit comments

Comments
 (0)