3 Commits

Author SHA1 Message Date
Emma Thorpe 86f14ad68a 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>
2026-06-12 11:38:30 +01:00
renovate-bot 1a0ffead5a Merge pull request 'chore(deps): update docker base image to v1.31' (#8) from renovate/docker-base-image into main
Build and publish container / build (push) Successful in 6m21s
2026-06-12 01:14:42 +01:00
Renovate Bot 719956341c chore(deps): update docker base image to v1.31
Build and publish container / build (pull_request) Successful in 4m38s
2026-06-12 00:02:27 +00:00
2 changed files with 23 additions and 2 deletions
+22 -1
View File
@@ -1,10 +1,31 @@
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:
push:
branches: [main]
paths:
- 'Dockerfile'
- 'default.conf'
- 'index.html'
- 'styles.css'
- 'script.js'
- 'messages.js'
- '.dockerignore'
pull_request:
branches: [main]
paths:
- 'Dockerfile'
- 'default.conf'
- 'index.html'
- 'styles.css'
- 'script.js'
- 'messages.js'
- '.dockerignore'
workflow_dispatch:
defaults:
run:
@@ -108,7 +129,7 @@ jobs:
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Build and push
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
+1 -1
View File
@@ -1,7 +1,7 @@
# Lightweight, non-root nginx serving the static site.
# Runs as user "nginx" and listens on 8080, ready to sit behind an
# external reverse proxy that terminates TLS and forwards requests.
FROM nginxinc/nginx-unprivileged:1.27-alpine-slim
FROM nginxinc/nginx-unprivileged:1.31-alpine-slim@sha256:6616de6eaa82bc2ee3541fa287a8fca7dc7271e6374e9402014dbd13f4a980ae
COPY default.conf /etc/nginx/conf.d/default.conf
COPY --chown=nginx:nginx index.html styles.css script.js messages.js /usr/share/nginx/html/