Skip to content

Add image-trigger-paths and skip-unchanged inputs - #156

Merged
jlaneve merged 1 commit into
mainfrom
image-trigger-paths
Jul 15, 2026
Merged

Add image-trigger-paths and skip-unchanged inputs#156
jlaneve merged 1 commit into
mainfrom
image-trigger-paths

Conversation

@jlaneve

@jlaneve jlaneve commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

what

adds two inputs to close the gap left by the deprecated deploy-image flag, reported in #155

  • image-trigger-paths: comma/newline list of paths outside root-folder that should also trigger a deploy when changed. models the monorepo case where files baked into the image at build time (e.g. generated protos) live outside the Astro project. a change under any of them forces an image deploy while unrelated pushes still skip
  • skip-unchanged (default true): set to false to disable the diff-based skip entirely and always honor deploy-type. this is the closest 1:1 replacement for deploy-image: true

why

when deploy-image was deprecated in favor of deploy-type, the replacement lost the "deploy even when root-folder shows no diff" behavior the old flag had. deploy-type: image-and-dags still runs through the same skip check, so there was no non-deprecated way to force an image deploy off changes outside root-folder. these two inputs give that capability a real home so deploy-image can eventually go away

testing

  • ran a real end-to-end deploy on stage: a push touching only proto/ (outside root-folder) built and deployed a real image, and a push touching only an unrelated top-level file correctly skipped
  • unit-style harness that renders and runs the action's actual Get Deploy Type bash against mocked diffs covers image-trigger-paths (image vs dags-only vs skip), skip-unchanged, and regressions (defaults unchanged, delete-preview precedence)

closes #155


🤖 Generated with Claude Code

https://claude.ai/code/session_01GeJw7cWHVQdoccfmfrUn4B

@jlaneve
jlaneve requested a review from a team as a code owner July 14, 2026 13:02

@neel-astro neel-astro left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left couple of minor comments, otherwise LGTM

Comment thread action.yaml
Useful in monorepos where files built or copied into the image at deploy time (e.g. generated protos) live outside
the Astro project. A change under any of these paths forces an image deploy instead of being skipped. Paths are
matched as prefixes against repo-root-relative file paths, so include a trailing slash to scope to a directory
(e.g. `proto/`). Only applies to the `infer`, `image-and-dags`, and `image-only` deploy types.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are missing upfront validation for "Only applies to the infer, image-and-dags, and image-only deploy types."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, added a hard-fail validation in the Determine Deploy Deployment step - errors if image-trigger-paths is set with dags-only or dbt (it only affects image deploys)

Comment thread action.yaml
When true (default), the action skips the deploy if no changed files fall under `root-folder` (or `image-trigger-paths`).
Set to false to disable this diff-based skip and always run the deploy dictated by `deploy-type` on every run. This is
the closest replacement for the deprecated `deploy-image: true` behavior. Only applies to the `infer`, `dags-only`,
`image-and-dags`, and `image-only` deploy types.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for this flag as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done - errors if skip-unchanged: false is set with dbt (the dbt path doesn't use the image/dags diff skip)

Comment thread action.yaml Outdated
fi

# skip-unchanged=false disables the diff-based skip entirely and always honors deploy-type
if [[ ${{ inputs.skip-unchanged }} == false ]]; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should be using quoted comparison to avoid hard fails when input var not set case is evaluated correctly. Can happen even if we have default set, when the caller wires the input such as skip-unchanged: ${{ vars.SKIP_UNCHANGED }} and not the set the variable.

Suggested change
if [[ ${{ inputs.skip-unchanged }} == false ]]; then
if [[ "${{ inputs.skip-unchanged }}" == "false" ]]; then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, quoted it

Adds two inputs to close the gap left by the deprecated deploy-image flag:

- image-trigger-paths: paths outside root-folder that also trigger an
  image deploy when changed (e.g. generated protos baked into the image
  in a monorepo).
- skip-unchanged: set to false to disable the diff-based skip and always
  honor deploy-type. Closest replacement for deploy-image: true.

Refs #155

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GeJw7cWHVQdoccfmfrUn4B
@jlaneve
jlaneve merged commit d1d25d8 into main Jul 15, 2026
2 of 3 checks passed
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.

Cannot force a image deploy when dep files outside the airflow/ dir changed without the deprecated deploy-image flag.

2 participants