Skip to content

Commit 387f9a0

Browse files
committed
ci: use paths-ignore to determine when to trigger build
It's better to build too many docker containers than too few, so let's go with not triggering the build if we know that only files irrelevant to the container are modified (instead of trying to explicitly list all files that are relevant). This way, if the list is stale, we build "too many" containers, whereas with the current solution, we build "too few" containers (see for example #132). Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent 2f11ed3 commit 387f9a0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/docker-publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ on:
44
workflow_dispatch:
55
push:
66
branches: [ "main" ]
7-
paths:
8-
- Dockerfile
9-
- .github/workflows/docker-publish.yml
10-
- build_container.sh
11-
- Dockerfile.riscv64
12-
- riscv64/*
7+
paths-ignore:
8+
- CODEOWNERS
9+
- LICENSE
10+
- README.md
11+
- img/*
12+
# We don't automatically build the windows image
13+
- Dockerfile.windows.x86_64
14+
- docker.ps1
1315
pull_request:
1416
branches: [ "main" ]
1517

0 commit comments

Comments
 (0)