Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) }},
Expand Down
1 change: 1 addition & 0 deletions ephemeral/startup/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Create PR Preview
description: 'Creates a preview environment for a pull request.'

inputs:
github-token:
Expand Down
22 changes: 15 additions & 7 deletions startup/action.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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}"
Expand All @@ -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 }}
Expand Down