Skip to content

Commit 3882a30

Browse files
authored
Fix image-tag input (#27)
1 parent 4b405a2 commit 3882a30

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,34 @@ jobs:
4242
awslocal s3 ls
4343
echo "Test Execution complete!"
4444
45+
localstack-action-version-test:
46+
name: 'Test LocalStack Version with Github Actions'
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v3
50+
51+
# We must hack the action call as remote to be able to use the relative paths
52+
# Could it break with different CWD? 🤔
53+
- name: Start LocalStack
54+
uses: jenseng/dynamic-uses@v1
55+
with:
56+
uses: LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }}
57+
with: |-
58+
{
59+
"image-tag": "3.2.0",
60+
"install-awslocal": "true",
61+
"configuration": "DEBUG=1",
62+
"use-pro": "true",
63+
}
64+
env:
65+
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
66+
GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
67+
68+
- name: Run Version Test Against LocalStack
69+
run: |
70+
LS_VERSION=$(docker ps | grep localstack | cut -d " " -f4 | cut -d ":" -f2)
71+
exit $(test "x${LS_VERSION}" = "x3.2.0")
72+
4573
cloud-pods-test:
4674
name: 'Test Cloud Pods Action'
4775
runs-on: ubuntu-latest

startup/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,14 @@ runs:
5555
if [ "x$LOCALSTACK_AUTH_TOKEN" = "x" -o "x$LOCALSTACK_API_KEY" = "x" ]; then
5656
echo "WARNING: LocalStack API key not detected, please verify your configuration..."
5757
fi
58-
docker pull localstack/localstack-pro:"$IMAGE_TAG" &
59-
CONFIGURATION="$CONFIGURATION DNS_ADDRESS=127.0.0.1"
58+
CONFIGURATION="DNS_ADDRESS=127.0.0.1 ${CONFIGURATION}"
59+
IMAGE_NAME="${IMAGE_NAME:-localstack/localstack-pro:${IMAGE_TAG}}"
6060
else
61-
docker pull localstack/localstack:"$IMAGE_TAG" &
61+
IMAGE_NAME="${IMAGE_NAME:-localstack/localstack:${IMAGE_TAG}}"
6262
fi
6363
64+
CONFIGURATION="IMAGE_NAME=${IMAGE_NAME} ${CONFIGURATION}"
65+
docker pull ${IMAGE_NAME} &
6466
export CI_PROJECT=${{ inputs.ci-project }}
6567
eval "${CONFIGURATION} localstack start -d"
6668

tools/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ runs:
1111
steps:
1212
- name: Start LocalStack
1313
run: |
14+
pip install --upgrade pip
1415
which localstack > /dev/null || pip install localstack
1516
if [ "$INSTALL_AWSLOCAL" = true ]; then
1617
which awslocal > /dev/null || pip install awscli-local[ver1]

0 commit comments

Comments
 (0)