Skip to content

Commit 00a7333

Browse files
authored
chore(ci): bump up setup-localstack version (#15)
2 parents c1ad2a6 + 159c02c commit 00a7333

File tree

2 files changed

+28
-24
lines changed

2 files changed

+28
-24
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,16 @@ jobs:
2828
node-version: 18
2929

3030
- name: Start LocalStack
31+
uses: LocalStack/setup-localstack@v0.2.0
3132
env:
3233
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
3334
DNS_ADDRESS: 0
34-
run: |
35-
pip install localstack awscli-local[ver1]
36-
pip install terraform-local
37-
docker pull localstack/localstack-pro:latest
38-
# Start LocalStack in the background
39-
DEBUG=1 localstack start -d
40-
# Wait 30 seconds for the LocalStack container to become ready before timing out
41-
echo "Waiting for LocalStack startup..."
42-
localstack wait -t 15
43-
echo "Startup complete"
35+
DEBUG: 1
36+
with:
37+
use-pro: 'true'
38+
39+
- name: Install tflocal
40+
run: pip install terraform-local
4441

4542
- name: Install CDK
4643
run: |

.github/workflows/preview.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,32 @@ jobs:
1414
uses: actions/checkout@v4
1515

1616
- name: Deploy Preview
17-
uses: LocalStack/setup-localstack/preview@main
17+
uses: LocalStack/setup-localstack@v0.2.0
18+
env:
19+
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
1820
with:
1921
github-token: ${{ secrets.GITHUB_TOKEN }}
20-
localstack-api-key: ${{ secrets.LOCALSTACK_API_KEY }}
22+
state-backend: ephemeral
23+
state-action: start
24+
include-preview: 'true'
25+
install-awslocal: 'true'
26+
# Multi line commands are folding for some reason, so we enforce new lines
27+
# For more predictable usage, use script files
2128
preview-cmd: |
22-
npm install -g aws-cdk-local aws-cdk
23-
pip install awscli-local[ver1]
24-
make build
25-
make bootstrap
26-
make deploy
27-
make prepare-frontend-local
28-
make build-frontend
29-
make bootstrap-frontend
30-
make deploy-frontend
31-
distributionId=$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id')
32-
echo "PREVIEW_URL=$AWS_ENDPOINT_URL/cloudfront/$distributionId/" >> $GITHUB_ENV
29+
npm install -g aws-cdk-local aws-cdk;
30+
make build;
31+
make bootstrap;
32+
make deploy;
33+
make prepare-frontend-local;
34+
make build-frontend;
35+
make bootstrap-frontend;
36+
make deploy-frontend;
37+
distributionId=$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id');
38+
echo \"PREVIEW_URL=$AWS_ENDPOINT_URL/cloudfront/$distributionId/\" >> $GITHUB_ENV;
39+
3340
3441
- name: Finalize PR comment
35-
uses: LocalStack/setup-localstack/finish@pass-url-to-finish-step
42+
uses: LocalStack/setup-localstack/finish@v0.2.0
3643
with:
3744
github-token: ${{ secrets.GITHUB_TOKEN }}
3845
include-preview: true

0 commit comments

Comments
 (0)