Skip to content

feat: add skip-pull input to reuse a locally present image#71

Open
travis-jorge wants to merge 1 commit into
localstack:mainfrom
travis-jorge:feat/skip-pull
Open

feat: add skip-pull input to reuse a locally present image#71
travis-jorge wants to merge 1 commit into
localstack:mainfrom
travis-jorge:feat/skip-pull

Conversation

@travis-jorge

Copy link
Copy Markdown

What

Adds an opt-in skip-pull input (default 'false') that skips the explicit docker pull in 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 runs docker 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

  • Default is 'false' — existing workflows are completely unchanged.
  • The pull being skipped is a backgrounded refresh (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.
  • Mirrors the existing skip-wait / skip-startup convention (kebab-case, string 'false' default) and is threaded from the root action into the startup sub-action exactly like skip-wait.

Changes

  • action.yml + startup/action.yml: new skip-pull input, threaded through and wired to guard the pull.
  • .github/workflows/ci.yml: new skip-pull-test job (pre-pulls the image, runs with skip-pull: 'true', asserts LocalStack started).
  • README.md: usage example for a cached image.

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.
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