Skip to content

Add exclude-files input to build-to-draft-release - #192

Merged
Jesse Hills (jesserockz) merged 1 commit into
mainfrom
jesserockz-2026-764
Oct 14, 2026
Merged

Jesse Hills (jesserockz) merged 1 commit into
mainfrom
jesserockz-2026-764

Conversation

@jesserockz

Copy link
Copy Markdown
Member

What does this implement/fix?

Adds an optional exclude-files input to build-to-draft-release.yml so a repository can keep *.factory.yaml auto-discovery while skipping configs it builds separately, instead of abandoning discovery and hard-coding every device path (which then silently rots whenever a device is added).

Entries are newline-separated glob patterns matched against the whole repository-relative path, with * spanning /, so a single *.minimal.factory.yaml excludes device/device.minimal.factory.yaml without naming the directory. The filter applies uniformly to both an explicitly-passed files list and the auto-discovered list, every exclusion is logged, and an exclusion that empties the list fails with a distinct error (Every file was excluded ...) separate from the existing "No *.factory.yaml files found". It is mutually exclusive with groups, which already lists each group's files explicitly; combining them is rejected at resolve time.

The motivating case is a repository with a variant config (e.g. a *.minimal.factory.yaml) that must not reach the main draft build or the release, which today forces the caller to drop discovery and enumerate every device path.

Testing

ci-draft-release.yml now adds a second factory fixture (tests/ci-draft-excluded.factory.yaml) and passes exclude-files: "*-excluded.factory.yaml" to the discovery smoke build. Both configs are discovered, and the run asserts the excluded one is not built while the other still is; the existing "unexpected top-level entry" guard makes a broken exclusion fail CI, so the test is not vacuous. Validated locally with yamllint ., actionlint + shellcheck (no new findings), and a harness that runs the extracted resolve script against realistic nested and top-level paths covering the empty, exact-path, glob, no-match, everything-excluded, and groups-conflict branches.

This is a backwards-compatible addition (optional, empty default). Consumers will need a new release tag to adopt it.

Lets a repository keep *.factory.yaml auto-discovery while skipping configs
it builds separately, instead of abandoning discovery and hard-coding every
device path. Patterns are globs matched against the whole repository-relative
path, so *.minimal.factory.yaml drops device/device.minimal.factory.yaml
without naming the directory. Mutually exclusive with groups.
@jesserockz
Jesse Hills (jesserockz) merged commit 2c59642 into main Oct 14, 2026
39 checks passed
@jesserockz
Jesse Hills (jesserockz) deleted the jesserockz-2026-764 branch October 14, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant