Skip to content
Merged
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
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
"image-tag": "3.2.0",
"install-awslocal": "true",
"configuration": "DEBUG=1",
"use-pro": "true",
}
env:
# intentially left `LOCALSTACK_API_KEY` as env here, to ensure the fallback still works for old version
Expand Down Expand Up @@ -59,7 +58,6 @@ jobs:
"image-tag": "latest",
"install-awslocal": "true",
"configuration": "DEBUG=1",
"use-pro": "true",
}
env:
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
Expand Down Expand Up @@ -111,7 +109,6 @@ jobs:
"image-tag": "latest",
"install-awslocal": "true",
"configuration": "DEBUG=1",
"use-pro": "true",
"state-name": "${{ needs.cloud-pods-save-test.outputs.pod-name }}",
"state-action": "load"
}
Expand Down Expand Up @@ -160,7 +157,6 @@ jobs:
"image-tag": "latest",
"install-awslocal": "true",
"configuration": "DEBUG=1",
"use-pro": "true",
}
env:
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
Expand Down Expand Up @@ -202,7 +198,6 @@ jobs:
"image-tag": "latest",
"install-awslocal": "true",
"configuration": "DEBUG=1",
"use-pro": "true",
"state-name": "local-pods-test",
"state-action": "load",
"state-backend": "local",
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

## [0.3.0]

### Breaking Changes

- **`use-pro` now defaults to `true`.** The action will use the `localstack/localstack-pro` image by default. Workflows that relied on the community image without setting `use-pro` will now get the Pro image, which requires a `LOCALSTACK_AUTH_TOKEN`. Set `use-pro: 'false'` explicitly if you need the community image. For newer versions of LocalStack these images are equivalent.

### Deprecated

- **`use-pro` input will be removed in a future release as we are consolidating our docker images**.

25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ A GitHub Action to setup [LocalStack](https://github.com/localstack/localstack)

```yml
- name: Start LocalStack
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
image-tag: 'latest'
install-awslocal: 'true'
env:
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
```
> **NOTE**: The `LOCALSTACK_AUTH_TOKEN` environment variable is required to be set if `use-pro` is set to `true`.
If the key is not found LocalStack by default falls back to the CE edition and displays a warning.
> **NOTE**: The `LOCALSTACK_AUTH_TOKEN` environment variable is required. Since `use-pro` now defaults to `true`, the action will use the Pro image by default.
> The `use-pro` input will be removed in a future release.

### Install only CLIs and startup later
```yml
- name: Install LocalStack CLIs
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
skip-startup: 'true'
install-awslocal: 'true'

...

- name: Start LocalStack
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
image-tag: 'latest'
env:
Expand All @@ -49,7 +49,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d
### Save a state later on in the pipeline
```yml
- name: Save LocalStack State
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
install-awslocal: 'true'
state-backend: cloud-pods
Expand All @@ -63,7 +63,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d
### Load an already saved state
```yml
- name: Start LocalStack and Load State
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
install-awslocal: 'true'
state-backend: cloud-pods
Expand All @@ -78,7 +78,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d

### Manage Application Previews (on an Ephemeral Instance)
```yml
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
state-backend: ephemeral
Expand All @@ -93,7 +93,7 @@ uses: LocalStack/setup-localstack@v0.2.5
...

with:
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
state-backend: ephemeral
Expand Down Expand Up @@ -122,7 +122,7 @@ with:
| `state-action` | Valid values are `load`, `save`, `start`, `stop`, `''` (empty, don't manage state). Values `start`/`stop` only usable with app previews. | `''` |
| `state-backend` | Either store the state of LocalStack locally, as a Cloud Pod or start an Ephemeral Instance. Valid values are `cloud-pods`, `ephemeral` or `local`. Use this option in unison with `state-action` to control behaviour. | `cloud-pods` |
| `state-name` | Name of the state artifact (without extension) | `false` |
| `use-pro` | Whether to use the Pro version of LocalStack (requires Auth Token to be configured) | `false` |
| `use-pro` | Whether to use the Pro version of LocalStack (requires Auth Token to be configured). Will be removed in a future release. | `true` |

## Example workflow
```yml
Expand All @@ -137,12 +137,11 @@ jobs:
- uses: actions/checkout@v3

- name: Start LocalStack
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
image-tag: 'latest'
install-awslocal: 'true'
configuration: DEBUG=1
use-pro: 'true'
state-backend: cloud-pods
state-action: load
state-name: my-cloud-pod
Expand All @@ -156,7 +155,7 @@ jobs:
echo "Test Execution complete!"

- name: Save LocalStack State
uses: LocalStack/setup-localstack@v0.2.5
uses: LocalStack/setup-localstack@v0.3.0
with:
state-backend: local
state-action: save
Expand Down
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ inputs:
required: true
default: 'true'
use-pro:
description: 'Whether to use LocalStack Pro (requires a valid CI Auth Token)'
description: 'Deprecated. Whether to use LocalStack Pro (requires a valid CI Auth Token)'
required: false
default: 'false'
default: 'true'
deprecationMessage: 'use-pro is deprecated and will be removed in a future release. The pro image is now the default.'
configuration:
description: 'Configuration variables to use for LocalStack'
required: false
Expand Down
10 changes: 7 additions & 3 deletions startup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ inputs:
required: true
default: 'true'
use-pro:
description: 'Whether to use LocalStack Pro (requires a valid CI Auth Token)'
description: 'Deprecated. Whether to use LocalStack Pro (requires a valid CI Auth Token)'
required: false
default: 'false'
default: 'true'
deprecationMessage: 'use-pro is deprecated and will be removed in a future release. The pro image is now the default.'
Comment on lines +14 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: TIL GitHub actions have an explicit declaration of deprecation for variables 🤩

configuration:
description: 'Configuration variables to use for LocalStack'
required: false
Expand Down Expand Up @@ -62,7 +63,10 @@ runs:
- name: Start LocalStack
run: |
if [ "$USE_PRO" = true ]; then
if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -o "x$LOCALSTACK_API_KEY" = "x" ]; then
if [ "x$LOCALSTACK_API_KEY" != "x" ]; then
Copy link
Member

@alexrashed alexrashed Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought (non-blocking): This is an interesting way of testing if a variable is empty or not (but I se this was already the case before, so totally out of scope). 😅
I guess I would rather use -z (check if a string is empty) or -n (check if a string is non-empty) as outlined in the Bash Reference Manual.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you said, I mostly just kept it to stay close to the current version, especially since I expect a more fundamental rewrite here anyway. 👍

echo "WARNING: LOCALSTACK_API_KEY is deprecated, please use LOCALSTACK_AUTH_TOKEN instead."
fi
if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -a "x$LOCALSTACK_API_KEY" = "x" ]; then
echo "WARNING: LocalStack Auth Token not detected, please verify your configuration..."
fi
CONFIGURATION="DNS_ADDRESS=127.0.0.1 ${CONFIGURATION}"
Expand Down
Loading