Skip to content

Commit 2e0e140

Browse files
Use the LocalStack pro image by default (#63)
1 parent 1feaef8 commit 2e0e140

File tree

5 files changed

+34
-23
lines changed

5 files changed

+34
-23
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
"image-tag": "3.2.0",
3030
"install-awslocal": "true",
3131
"configuration": "DEBUG=1",
32-
"use-pro": "true",
3332
}
3433
env:
3534
# intentially left `LOCALSTACK_API_KEY` as env here, to ensure the fallback still works for old version
@@ -59,7 +58,6 @@ jobs:
5958
"image-tag": "latest",
6059
"install-awslocal": "true",
6160
"configuration": "DEBUG=1",
62-
"use-pro": "true",
6361
}
6462
env:
6563
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
@@ -111,7 +109,6 @@ jobs:
111109
"image-tag": "latest",
112110
"install-awslocal": "true",
113111
"configuration": "DEBUG=1",
114-
"use-pro": "true",
115112
"state-name": "${{ needs.cloud-pods-save-test.outputs.pod-name }}",
116113
"state-action": "load"
117114
}
@@ -160,7 +157,6 @@ jobs:
160157
"image-tag": "latest",
161158
"install-awslocal": "true",
162159
"configuration": "DEBUG=1",
163-
"use-pro": "true",
164160
}
165161
env:
166162
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
@@ -202,7 +198,6 @@ jobs:
202198
"image-tag": "latest",
203199
"install-awslocal": "true",
204200
"configuration": "DEBUG=1",
205-
"use-pro": "true",
206201
"state-name": "local-pods-test",
207202
"state-action": "load",
208203
"state-backend": "local",

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
## [0.3.0]
4+
5+
### Breaking Changes
6+
7+
- **`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.
8+
9+
### Deprecated
10+
11+
- **`use-pro` input will be removed in a future release as we are consolidating our docker images**.
12+

README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ A GitHub Action to setup [LocalStack](https://github.com/localstack/localstack)
1818

1919
```yml
2020
- name: Start LocalStack
21-
uses: LocalStack/setup-localstack@v0.2.5
21+
uses: LocalStack/setup-localstack@v0.3.0
2222
with:
2323
image-tag: 'latest'
2424
install-awslocal: 'true'
2525
env:
2626
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
2727
```
28-
> **NOTE**: The `LOCALSTACK_AUTH_TOKEN` environment variable is required to be set if `use-pro` is set to `true`.
29-
If the key is not found LocalStack by default falls back to the CE edition and displays a warning.
28+
> **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.
29+
> The `use-pro` input will be removed in a future release.
3030

3131
### Install only CLIs and startup later
3232
```yml
3333
- name: Install LocalStack CLIs
34-
uses: LocalStack/setup-localstack@v0.2.5
34+
uses: LocalStack/setup-localstack@v0.3.0
3535
with:
3636
skip-startup: 'true'
3737
install-awslocal: 'true'
3838
3939
...
4040
4141
- name: Start LocalStack
42-
uses: LocalStack/setup-localstack@v0.2.5
42+
uses: LocalStack/setup-localstack@v0.3.0
4343
with:
4444
image-tag: 'latest'
4545
env:
@@ -49,7 +49,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d
4949
### Save a state later on in the pipeline
5050
```yml
5151
- name: Save LocalStack State
52-
uses: LocalStack/setup-localstack@v0.2.5
52+
uses: LocalStack/setup-localstack@v0.3.0
5353
with:
5454
install-awslocal: 'true'
5555
state-backend: cloud-pods
@@ -63,7 +63,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d
6363
### Load an already saved state
6464
```yml
6565
- name: Start LocalStack and Load State
66-
uses: LocalStack/setup-localstack@v0.2.5
66+
uses: LocalStack/setup-localstack@v0.3.0
6767
with:
6868
install-awslocal: 'true'
6969
state-backend: cloud-pods
@@ -78,7 +78,7 @@ If the key is not found LocalStack by default falls back to the CE edition and d
7878

7979
### Manage Application Previews (on an Ephemeral Instance)
8080
```yml
81-
uses: LocalStack/setup-localstack@v0.2.5
81+
uses: LocalStack/setup-localstack@v0.3.0
8282
with:
8383
github-token: ${{ secrets.GITHUB_TOKEN }}
8484
state-backend: ephemeral
@@ -93,7 +93,7 @@ uses: LocalStack/setup-localstack@v0.2.5
9393
...
9494

9595
with:
96-
uses: LocalStack/setup-localstack@v0.2.5
96+
uses: LocalStack/setup-localstack@v0.3.0
9797
with:
9898
github-token: ${{ secrets.GITHUB_TOKEN }}
9999
state-backend: ephemeral
@@ -122,7 +122,7 @@ with:
122122
| `state-action` | Valid values are `load`, `save`, `start`, `stop`, `''` (empty, don't manage state). Values `start`/`stop` only usable with app previews. | `''` |
123123
| `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` |
124124
| `state-name` | Name of the state artifact (without extension) | `false` |
125-
| `use-pro` | Whether to use the Pro version of LocalStack (requires Auth Token to be configured) | `false` |
125+
| `use-pro` | Whether to use the Pro version of LocalStack (requires Auth Token to be configured). Will be removed in a future release. | `true` |
126126

127127
## Example workflow
128128
```yml
@@ -137,12 +137,11 @@ jobs:
137137
- uses: actions/checkout@v3
138138
139139
- name: Start LocalStack
140-
uses: LocalStack/setup-localstack@v0.2.5
140+
uses: LocalStack/setup-localstack@v0.3.0
141141
with:
142142
image-tag: 'latest'
143143
install-awslocal: 'true'
144144
configuration: DEBUG=1
145-
use-pro: 'true'
146145
state-backend: cloud-pods
147146
state-action: load
148147
state-name: my-cloud-pod
@@ -156,7 +155,7 @@ jobs:
156155
echo "Test Execution complete!"
157156
158157
- name: Save LocalStack State
159-
uses: LocalStack/setup-localstack@v0.2.5
158+
uses: LocalStack/setup-localstack@v0.3.0
160159
with:
161160
state-backend: local
162161
state-action: save

action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ inputs:
1616
required: true
1717
default: 'true'
1818
use-pro:
19-
description: 'Whether to use LocalStack Pro (requires a valid CI Auth Token)'
19+
description: 'Deprecated. Whether to use LocalStack Pro (requires a valid CI Auth Token)'
2020
required: false
21-
default: 'false'
21+
default: 'true'
22+
deprecationMessage: 'use-pro is deprecated and will be removed in a future release. The pro image is now the default.'
2223
configuration:
2324
description: 'Configuration variables to use for LocalStack'
2425
required: false

startup/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ inputs:
1111
required: true
1212
default: 'true'
1313
use-pro:
14-
description: 'Whether to use LocalStack Pro (requires a valid CI Auth Token)'
14+
description: 'Deprecated. Whether to use LocalStack Pro (requires a valid CI Auth Token)'
1515
required: false
16-
default: 'false'
16+
default: 'true'
17+
deprecationMessage: 'use-pro is deprecated and will be removed in a future release. The pro image is now the default.'
1718
configuration:
1819
description: 'Configuration variables to use for LocalStack'
1920
required: false
@@ -62,7 +63,10 @@ runs:
6263
- name: Start LocalStack
6364
run: |
6465
if [ "$USE_PRO" = true ]; then
65-
if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -o "x$LOCALSTACK_API_KEY" = "x" ]; then
66+
if [ "x$LOCALSTACK_API_KEY" != "x" ]; then
67+
echo "WARNING: LOCALSTACK_API_KEY is deprecated, please use LOCALSTACK_AUTH_TOKEN instead."
68+
fi
69+
if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -a "x$LOCALSTACK_API_KEY" = "x" ]; then
6670
echo "WARNING: LocalStack Auth Token not detected, please verify your configuration..."
6771
fi
6872
CONFIGURATION="DNS_ADDRESS=127.0.0.1 ${CONFIGURATION}"

0 commit comments

Comments
 (0)