Skip to content

Commit 9b19275

Browse files
committed
Add auth token guard to Makefile and upgrade workflow actions
1 parent 715449c commit 9b19275

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424

2525
- name: Setup Node.js
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
2828
node-version: 18
2929

3030
- name: Start LocalStack
31-
uses: LocalStack/setup-localstack@v0.2.2
31+
uses: LocalStack/setup-localstack@main
3232
env:
33-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
33+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
3434
DNS_ADDRESS: 0
3535
DEBUG: 1
3636
with:

.github/workflows/preview.yml

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

1616
- name: Deploy Preview
17-
uses: LocalStack/setup-localstack@v0.2.2
17+
uses: LocalStack/setup-localstack@main
1818
env:
19-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
19+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
2020
with:
2121
github-token: ${{ secrets.GITHUB_TOKEN }}
2222
state-backend: ephemeral

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ deploy:
2828

2929
## Start LocalStack in detached mode
3030
start:
31-
localstack start -d
31+
@test -n "${LOCALSTACK_AUTH_TOKEN}" || (echo "LOCALSTACK_AUTH_TOKEN is not set. Find your token at https://app.localstack.cloud/workspace/auth-token"; exit 1)
32+
@LOCALSTACK_AUTH_TOKEN=$(LOCALSTACK_AUTH_TOKEN) localstack start -d
3233

3334
## export configs for web app
3435
prepare-frontend-local:

0 commit comments

Comments
 (0)