ci: skip Docker publish for .gitea/.planning-only pushes #16

Merged
luckberg merged 4 commits from quick/260613-fp9-publish-paths-ignore into main 2026-06-13 12:17:52 -04:00
Owner

What

Adds a paths-ignore filter to the push trigger in .gitea/workflows/publish.yml:

on:
  push:
    branches: [main]
    paths-ignore:
      - '.gitea/**'
      - '.planning/**'

Why

Every push to main previously ran a full Docker build + push. Pushes confined to .planning/** (GSD planning docs push straight to main under the unprotected .planning/* branch-protection pattern) or .gitea/** (CI/workflow edits merged via PR) produce a byte-identical image — .dockerignore already excludes .planning. The rebuild and :latest re-push were wasted runner time.

Behavior

  • Push touching only .gitea/** and/or .planning/**publish job skipped.
  • Push touching code / Dockerfile / manifests (alone or mixed with docs) → publish runs as before. paths-ignore skips only when every changed file matches.

Merging this PR is itself a .gitea-only push, so it will correctly not trigger a publish.

Verification

  • YAML parses; on.push carries both branches: [main] and paths-ignore: ['.gitea/**', '.planning/**']; the publish job is intact.
  • The in-workflow grep "--target production" D-10 hygiene self-assertion still matches.

Quick task 260613-fp9.

## What Adds a `paths-ignore` filter to the `push` trigger in `.gitea/workflows/publish.yml`: ```yaml on: push: branches: [main] paths-ignore: - '.gitea/**' - '.planning/**' ``` ## Why Every push to `main` previously ran a full Docker build + push. Pushes confined to `.planning/**` (GSD planning docs push straight to main under the unprotected `.planning/*` branch-protection pattern) or `.gitea/**` (CI/workflow edits merged via PR) produce a byte-identical image — `.dockerignore` already excludes `.planning`. The rebuild and `:latest` re-push were wasted runner time. ## Behavior - Push touching only `.gitea/**` and/or `.planning/**` → `publish` job skipped. - Push touching code / Dockerfile / manifests (alone or mixed with docs) → `publish` runs as before. `paths-ignore` skips only when **every** changed file matches. Merging this PR is itself a `.gitea`-only push, so it will correctly not trigger a publish. ## Verification - YAML parses; `on.push` carries both `branches: [main]` and `paths-ignore: ['.gitea/**', '.planning/**']`; the `publish` job is intact. - The in-workflow `grep "--target production"` D-10 hygiene self-assertion still matches. Quick task 260613-fp9.
luckberg added 2 commits 2026-06-13 11:25:02 -04:00
Add paths-ignore ['.gitea/**', '.planning/**'] to publish.yml's push
trigger. Doc/CI-only pushes to main (planning docs push straight to main;
workflow edits merge via PR) produce a byte-identical image (.dockerignore
already excludes .planning), so the build + :latest re-push was wasted.
paths-ignore skips only when every changed file matches; mixed code+docs
pushes still publish.
docs(quick-260613-fp9): .gitea/.planning pushes should not trigger a docker image publish
CI / changes (pull_request) Successful in 2s
CI / fast-checks (pull_request) Successful in 1m24s
CI / api (pull_request) Successful in 1m0s
CI / harness (pull_request) Successful in 3m53s
CI / security (pull_request) Successful in 39s
CI / gate (pull_request) Successful in 1s
4d4ffad059
luckberg added 2 commits 2026-06-13 12:14:05 -04:00
dorny/paths-filter combines patterns with Array.some, and picomatch compiles
'!.gitea/**' as 'any path not under .gitea'. The '- !.gitea/**' line (from
quick task 260613-dmw) therefore matched every non-.gitea file — including
.planning/** and *.md — so code=true for doc-only PRs and the heavy api/harness
jobs ran anyway. It also never excluded .gitea (the **/*.yml glob already
matched workflow files), regressing the Phase 15 doc-only skip.

Switch to predicate-quantifier 'every' with negation-only globs: a file counts
as code only if it is outside .gitea/, outside .planning/, and not Markdown.
Verified with picomatch against representative file sets.
docs(quick-260613-fp9): document ci.yml heavy-job paths-filter fix
CI / changes (pull_request) Successful in 3s
CI / fast-checks (pull_request) Successful in 1m36s
CI / api (pull_request) Has been skipped
CI / harness (pull_request) Has been skipped
CI / security (pull_request) Successful in 9s
CI / gate (pull_request) Successful in 2s
15fa89d483
luckberg merged commit efa42801b5 into main 2026-06-13 12:17:52 -04:00
luckberg deleted branch quick/260613-fp9-publish-paths-ignore 2026-06-13 12:17:53 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: luckberg/familysync#16