ci: only build when image-affecting files change
Add path filters so the workflow runs only when the Dockerfile, nginx config, site assets or .dockerignore change. CI-config, Renovate-config and docs changes (such as a Renovate bump of a CI action) no longer trigger a build or release. workflow_dispatch is added for manual runs after pipeline changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,31 @@
|
|||||||
name: Build and publish container
|
name: Build and publish container
|
||||||
|
|
||||||
|
# Only run when files that affect the built image change. Updates to CI
|
||||||
|
# config, Renovate config, or docs (e.g. a Renovate bump of the checkout
|
||||||
|
# action) do not change the image and so do not trigger a build or release.
|
||||||
|
# Use workflow_dispatch to run manually after a pipeline change.
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- 'Dockerfile'
|
||||||
|
- 'default.conf'
|
||||||
|
- 'index.html'
|
||||||
|
- 'styles.css'
|
||||||
|
- 'script.js'
|
||||||
|
- 'messages.js'
|
||||||
|
- '.dockerignore'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
paths:
|
||||||
|
- 'Dockerfile'
|
||||||
|
- 'default.conf'
|
||||||
|
- 'index.html'
|
||||||
|
- 'styles.css'
|
||||||
|
- 'script.js'
|
||||||
|
- 'messages.js'
|
||||||
|
- '.dockerignore'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|||||||
Reference in New Issue
Block a user