Add image-trigger-paths and skip-unchanged inputs - #156
Conversation
neel-astro
left a comment
There was a problem hiding this comment.
Left couple of minor comments, otherwise LGTM
| 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. |
There was a problem hiding this comment.
we are missing upfront validation for "Only applies to the infer, image-and-dags, and image-only deploy types."
There was a problem hiding this comment.
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)
| 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. |
There was a problem hiding this comment.
same for this flag as well
There was a problem hiding this comment.
done - errors if skip-unchanged: false is set with dbt (the dbt path doesn't use the image/dags diff skip)
| fi | ||
|
|
||
| # skip-unchanged=false disables the diff-based skip entirely and always honors deploy-type | ||
| if [[ ${{ inputs.skip-unchanged }} == false ]]; then |
There was a problem hiding this comment.
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.
| if [[ ${{ inputs.skip-unchanged }} == false ]]; then | |
| if [[ "${{ inputs.skip-unchanged }}" == "false" ]]; then |
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
c5e0047 to
0d2b787
Compare
what
adds two inputs to close the gap left by the deprecated
deploy-imageflag, reported in #155image-trigger-paths: comma/newline list of paths outsideroot-folderthat 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 skipskip-unchanged(defaulttrue): set tofalseto disable the diff-based skip entirely and always honordeploy-type. this is the closest 1:1 replacement fordeploy-image: truewhy
when
deploy-imagewas deprecated in favor ofdeploy-type, the replacement lost the "deploy even whenroot-foldershows no diff" behavior the old flag had.deploy-type: image-and-dagsstill runs through the same skip check, so there was no non-deprecated way to force an image deploy off changes outsideroot-folder. these two inputs give that capability a real home sodeploy-imagecan eventually go awaytesting
proto/(outsideroot-folder) built and deployed a real image, and a push touching only an unrelated top-level file correctly skippedGet Deploy Typebash 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