Allow specifying a custom Docker image name and registry #53
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.
Description
This pull request enhances the
setup-localstack
action by introducing a new input,image-name
. This allows users to specify a full Docker image name, including a custom registry (e.g.,my.registry.com/localstack/localstack:latest
), rather than being limited to images hosted on Docker Hub, for when organizational policies restrict where images are allowed to be pulled from.The action has been updated to prioritize the
image-name
input. If it is provided, it will be used directly to pull the LocalStack image (populating the$IMAGE_NAME
environment variable). If it is not provided, the action will fall back to the existing behavior of constructing the image name using theimage-tag
input.This change provides greater flexibility for users who manage their own Docker registries or use mirrors.
Changes
image-name
input inaction.yml
and pass it to thestartup
sub-action.startup/action.yml
to accept theimage-name
input and modify the startup logic to prioritize it overimage-tag
(directly populating$IMAGE_NAME
).README.md
to include the newimage-name
input.How to use
To use a custom image, simply add the
image-name
input to your workflow: