Skip to content

Commit 8c6f7dc

Browse files
committed
feat: add configuration input and localstack pro usage
1 parent 75f237e commit 8c6f7dc

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ jobs:
1313
with:
1414
image-tag: 'latest'
1515
install-awslocal: 'true'
16+
configuration: DEBUG=1
17+
use-pro: 'true'
1618
env:
1719
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
1820

1921
- name: Run Tests against LocalStack
2022
run: |
2123
awslocal s3 mb s3://test
2224
awslocal s3 ls
23-
echo "Test Execution complete!"
25+
echo "Test Execution complete!"

action.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,35 @@ inputs:
1212
required: true
1313
default: 'latest'
1414
install-awslocal:
15-
description: 'Whether to install the `awslocal` CLI into the build environment'
15+
description: 'Whether to install the `awslocal` CLI into the environment'
1616
required: true
1717
default: 'true'
18+
use-pro:
19+
description: 'Whether to use LocalStack Pro (requires a valid API key)'
20+
required: false
21+
default: 'false'
22+
configuration:
23+
description: 'Configuration variables to use for LocalStack'
24+
required: false
25+
default: ''
1826

1927
runs:
2028
using: "composite"
2129
steps:
2230
-
2331
run: |
2432
pip install pyopenssl -U
25-
docker pull localstack/localstack:$IMAGE_TAG
33+
34+
if [ "$USE_PRO" = true ]; then
35+
docker pull localstack/localstack-pro:"$IMAGE_TAG"
36+
CONFIGURATION="$CONFIGURATION DNS_ADDRESS=0"
37+
else
38+
docker pull localstack/localstack:"$IMAGE_TAG"
39+
fi
40+
2641
pip install localstack
27-
localstack start -d
42+
eval "${CONFIGURATION} localstack start -d"
43+
2844
localstack wait -t 30
2945
if [ "$INSTALL_AWSLOCAL" = true ]; then
3046
pip install awscli-local[ver1]
@@ -33,3 +49,5 @@ runs:
3349
env:
3450
IMAGE_TAG: "${{ inputs.image-tag }}"
3551
INSTALL_AWSLOCAL: "${{ inputs.install-awslocal }}"
52+
USE_PRO: "${{ inputs.use-pro }}"
53+
CONFIGURATION: "${{ inputs.configuration }}"

0 commit comments

Comments
 (0)