Skip to content

Make path and keep_releases required target fields, drop the duplicated defaults #139

Description

@ineedjet

Context

targets/*.yml's hosts, app_refs, apps, and credentials are all required — there's no sensible default for any of them, they're inherently unique per target. path and keep_releases are the odd ones out: they're optional, with a fallback applied in .github/workflows/deploy.yml:

path: ${{ matrix.path || '~/flightdeck' }}
keep-releases: ${{ matrix.keep_releases || 5 }}

This means a target manifest can silently omit both fields and still work, which is inconsistent with every other field in the same file always being spelled out explicitly.

Worse, the same default values are duplicated a second time, in deploy-shared.yml's own workflow_call input defaults:

path:
  default: "~/flightdeck"
keep-releases:
  default: 5

That second default is effectively dead code for calls coming from deploy.ymldeploy.yml always resolves and passes a concrete value (even the fallback one), so deploy-shared.yml's own default never actually triggers through that path. It only matters for an external consumer repo calling deploy-shared.yml directly (see README's reusable-workflow usage). Two copies of the same default value, in two files, with no mechanism keeping them in sync — if one changes without the other, they drift silently.

Proposal

  1. Make path and keep_releases required fields in every targets/*.yml manifest, alongside hosts/app_refs/apps.
  2. Drop the matrix.path || '~/flightdeck' / matrix.keep_releases || 5 fallback in deploy.yml — pass matrix.path/matrix.keep_releases through as-is.
  3. Decide what happens to deploy-shared.yml's own input defaults — since it's still a public reusable workflow entry point for external consumer repos (per README), those defaults may be worth keeping there as the only place a default lives, rather than removing them entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions