diff --git a/README.md b/README.md index 817a293..28e1fe7 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,7 @@ with: | `extension-auto-install` | Which extensions to install on startup of LocalStack (application preview) | `None` | | `github-token` | Github token used to create PR comments | | | `image-tag` | Tag of the LocalStack Docker image to use | `latest` | +| `image-name` | Full name of the LocalStack Docker image to use (e.g., `my.registry.com/localstack/localstack:latest`). Overrides `image-tag`. | `''` | | `include-preview` | Whether to include the created Ephemeral Instance URL in the PR comment | `false` | | `install-awslocal` | Whether to install the `awslocal` CLI into the build environment | `true` | | `lifetime` | How long an ephemeral instance should live | 30 | diff --git a/action.yml b/action.yml index 587adc5..02a8c2e 100644 --- a/action.yml +++ b/action.yml @@ -11,6 +11,10 @@ inputs: description: 'Tag of the LocalStack Docker image to use' required: true default: 'latest' + image-name: + description: 'Full name of the LocalStack Docker image to use (e.g., my.registry.com/localstack/localstack:latest). Overrides image-tag.' + required: false + default: '' install-awslocal: description: 'Whether to install the `awslocal` CLI into the environment' required: true @@ -117,6 +121,7 @@ runs: with: |- { "image-tag": ${{ toJSON(inputs.image-tag) }}, + "image-name": ${{ toJSON(inputs.image-name) }}, "install-awslocal": ${{ toJSON(inputs.install-awslocal) }}, "use-pro": ${{ toJSON(inputs.use-pro) }}, "configuration": ${{ toJSON(inputs.configuration) }}, diff --git a/ephemeral/startup/action.yml b/ephemeral/startup/action.yml index 5a580b3..1d1f8e4 100644 --- a/ephemeral/startup/action.yml +++ b/ephemeral/startup/action.yml @@ -1,4 +1,5 @@ name: Create PR Preview +description: 'Creates a preview environment for a pull request.' inputs: github-token: diff --git a/startup/action.yml b/startup/action.yml index ec88fd5..88f148f 100644 --- a/startup/action.yml +++ b/startup/action.yml @@ -1,10 +1,15 @@ name: 'Start up Localstack' +description: 'Starts up LocalStack container' inputs: image-tag: description: 'Tag of the LocalStack Docker image to use' required: true default: 'latest' + image-name: + description: 'Full name of the LocalStack Docker image to use (e.g., my.registry.com/localstack/localstack:latest). Overrides image-tag.' + required: false + default: '' install-awslocal: description: 'Whether to install the `awslocal` CLI into the environment' required: true @@ -60,14 +65,16 @@ runs: - name: Start LocalStack run: | - if [ "$USE_PRO" = true ]; then - if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -o "x$LOCALSTACK_API_KEY" = "x" ]; then - echo "WARNING: LocalStack API key not detected, please verify your configuration..." + if [ -z "$IMAGE_NAME" ]; then + if [ "$USE_PRO" = true ]; then + if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -o "x$LOCALSTACK_API_KEY" = "x" ]; then + echo "WARNING: LocalStack API key not detected, please verify your configuration..." + fi + CONFIGURATION="DNS_ADDRESS=127.0.0.1 ${CONFIGURATION}" + IMAGE_NAME="localstack/localstack-pro:${IMAGE_TAG}" + else + IMAGE_NAME="localstack/localstack:${IMAGE_TAG}" fi - CONFIGURATION="DNS_ADDRESS=127.0.0.1 ${CONFIGURATION}" - IMAGE_NAME="${IMAGE_NAME:-localstack/localstack-pro:${IMAGE_TAG}}" - else - IMAGE_NAME="${IMAGE_NAME:-localstack/localstack:${IMAGE_TAG}}" fi CONFIGURATION="IMAGE_NAME=${IMAGE_NAME} ${CONFIGURATION}" @@ -82,6 +89,7 @@ runs: shell: bash env: IMAGE_TAG: ${{ inputs.image-tag }} + IMAGE_NAME: ${{ inputs.image-name }} INSTALL_AWSLOCAL: ${{ inputs.install-awslocal }} USE_PRO: ${{ inputs.use-pro }} CONFIGURATION: ${{ inputs.configuration }}