From e302a1341d9b8a29c80170a3d50ea8e3eed37e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20N=C3=A9meth?= Date: Thu, 16 May 2024 18:44:00 +0200 Subject: [PATCH 1/2] Add ecr support for codebuild (#15) --- action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 462ef60..df16a0b 100644 --- a/action.yml +++ b/action.yml @@ -51,11 +51,16 @@ runs: run: | pip install pyopenssl -U + LS_IMAGE_STUB="localstack/localstack" + if [ "x${CODEBUILD_BUILD_ID}" != "x" ]; then + LS_IMAGE_STUB="public.ecr.aws/${LS_IMAGE_STUB}" + fi + if [ "$USE_PRO" = true ]; then - docker pull localstack/localstack-pro:"$IMAGE_TAG" & + docker pull ${LS_IMAGE_STUB}-pro:"$IMAGE_TAG" & CONFIGURATION="$CONFIGURATION DNS_ADDRESS=127.0.0.1" else - docker pull localstack/localstack:"$IMAGE_TAG" & + docker pull ${LS_IMAGE_STUB}:"$IMAGE_TAG" & fi pip install localstack From 1a99576e2f8def7f99fa7252d13614c8cad5ee94 Mon Sep 17 00:00:00 2001 From: lakkeger Date: Fri, 17 May 2024 09:50:36 +0200 Subject: [PATCH 2/2] fix(ci): update ephemeral ci with version fix --- .github/workflows/ephemeral.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ephemeral.yml b/.github/workflows/ephemeral.yml index e68902e..923f6c7 100644 --- a/.github/workflows/ephemeral.yml +++ b/.github/workflows/ephemeral.yml @@ -10,21 +10,29 @@ jobs: - uses: actions/checkout@v3 - name: Deploy Preview - uses: ./ + uses: jenseng/dynamic-uses@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - state-backend: preview - state-action: start - skip-preview-stop: 'true' + uses: LocalStack/setup-localstack@${{ env.action-version }} + with: |- + { + "github-token": "${{ secrets.GITHUB_TOKEN }}", + "state-backend": "preview", + "state-action": "start", + "skip-preview-stop": "true" + } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} # We want explicit shutdown - name: Shutdown ephemeral instance - uses: ./ + uses: jenseng/dynamic-uses@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - state-backend: preview - state-action: stop + uses: LocalStack/setup-localstack@${{ env.action-version }} + with: |- + { + "github-token": "${{ secrets.GITHUB_TOKEN }}", + "state-backend": "preview", + "state-action": "stop" + } env: LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}