Skip to content

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

Open
plafond wants to merge 1 commit into
mainfrom
feat/skip-pull
Open

feat: add skip-pull input to reuse a locally present image#73
plafond wants to merge 1 commit into
mainfrom
feat/skip-pull

Conversation

@plafond

@plafond plafond commented Jun 16, 2026

Copy link
Copy Markdown

Note: This is an internal mirror of fork PR #71 by @travis-jorge.

The code in PR #71 was reviewed and confirmed correct before this mirror was created. The mirror is necessary purely for CI: GitHub does not expose repository secrets to pull_request workflows triggered from forks (Secret source: None), so all jobs requiring LOCALSTACK_AUTH_TOKEN (pro image startup, cloud pods, etc.) fail with "License activation failed" regardless of code correctness. Mirroring the branch internally restores secret access so CI can run normally.

Original commits and authorship are preserved via git cherry-pick. Please close PR #71 once this is merged.


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.

2 participants