feat: add skip-pull input to reuse a locally present image#71
Open
travis-jorge wants to merge 1 commit into
Open
feat: add skip-pull input to reuse a locally present image#71travis-jorge wants to merge 1 commit into
travis-jorge wants to merge 1 commit into
Conversation
Adds an opt-in `skip-pull` input (default 'false', no behavior change when unset) that skips the explicit `docker pull` in the startup step. This lets callers reuse an image already present locally — e.g. one restored from a CI cache via `docker load`, or baked into a self-hosted runner — avoiding a redundant registry round-trip and Docker Hub rate limit usage on every run. It is safe because the pull being skipped is a backgrounded refresh: `localstack start -d` still pulls the image itself if it is genuinely missing, so a caller that sets the flag without a present image is not left without one. The input mirrors the existing `skip-wait` / `skip-startup` convention (kebab-case, string 'false' default) and is threaded root action -> startup sub-action the same way. Includes a CI test job and a README example.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an opt-in
skip-pullinput (default'false') that skips the explicitdocker pullin the startup step. When set, the action uses an image that is already present locally instead of pulling it.Why
In CI it's common to restore the LocalStack image from a cache (
actions/cache+docker load) or bake it into a self-hosted runner. Today the startup step always runsdocker pull ${IMAGE_NAME} &, so those setups still pay a registry round-trip and a Docker Hub rate-limit hit on every run.skip-pull: 'true'lets them avoid it.Why it's safe / backward compatible
'false'— existing workflows are completely unchanged.docker pull ... &). The next line,localstack start -d, still pulls the image itself if it is genuinely missing — so setting the flag without a pre-loaded image does not leave you without one.skip-wait/skip-startupconvention (kebab-case, string'false'default) and is threaded from the root action into thestartupsub-action exactly likeskip-wait.Changes
action.yml+startup/action.yml: newskip-pullinput, threaded through and wired to guard the pull..github/workflows/ci.yml: newskip-pull-testjob (pre-pulls the image, runs withskip-pull: 'true', asserts LocalStack started).README.md: usage example for a cached image.