Don't rebuild image on paths not included in image #25

Merged
Lumpiasty merged 1 commits from fix/skip-builds into main 2026-06-12 01:17:35 +00:00
2 changed files with 15 additions and 9 deletions
Showing only changes of commit ee5ca68fc3 - Show all commits
+9 -6
View File
@@ -9,21 +9,24 @@
# Reports pass/fail status back to Gitea, so it shows up as a required check on # Reports pass/fail status back to Gitea, so it shows up as a required check on
# the PR. # the PR.
# Doc-only changes can't affect the image, so they don't trigger the build. # Changes that can't affect the image don't trigger the build: docs and the
# RouterOS-side script (routeros/**: lives on the router, not in the image).
# NOTE: if Gitea is ever configured to REQUIRE this check for merging, a # NOTE: if Gitea is ever configured to REQUIRE this check for merging, a
# doc-only PR will have no check at all — exempt such PRs or merge manually. # PR touching only excluded files will have no check at all — exempt such PRs
# Renovate PRs always touch the Dockerfile or pipeline files, so the # or merge manually. Renovate PRs always touch the Dockerfile or pipeline
# automerge gate is unaffected by these exclusions. # files, so the automerge gate is unaffected by these exclusions.
when: when:
- event: pull_request - event: pull_request
path: path:
exclude: &doc_paths exclude: &non_image_paths
- '**/*.md' - '**/*.md'
- 'docs/**' - 'docs/**'
- 'routeros/**'
- 'renovate.json'
- event: push - event: push
branch: main branch: main
path: path:
exclude: *doc_paths exclude: *non_image_paths
steps: steps:
- name: Build all arches (no push) - name: Build all arches (no push)
+6 -3
View File
@@ -13,9 +13,10 @@
# unchanged, so no tag is created and nothing is released — they ride along # unchanged, so no tag is created and nothing is released — they ride along
# with the next Tailscale bump or manual tag. # with the next Tailscale bump or manual tag.
# Skipped for doc-only pushes: TAILSCALE_VERSION lives in the Dockerfile, so a # Skipped for pushes that can't introduce a new Tailscale version:
# push that doesn't touch non-doc files can never introduce a new version to # TAILSCALE_VERSION lives in the Dockerfile, so a push touching only docs or
# tag (the job would just no-op after spinning up OpenBao + git containers). # the RouterOS-side script can never produce a new version to tag (the job
# would just no-op after spinning up OpenBao + git containers).
when: when:
- event: push - event: push
branch: main branch: main
@@ -23,6 +24,8 @@ when:
exclude: exclude:
- '**/*.md' - '**/*.md'
- 'docs/**' - 'docs/**'
- 'routeros/**'
- 'renovate.json'
steps: steps:
- name: Get git token from OpenBao - name: Get git token from OpenBao