Skip to content

Commit

Permalink
add new cloud pods action
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshCasper committed Oct 18, 2023
1 parent a81707a commit 97aa843
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,33 @@ jobs:
awslocal s3 mb s3://test
awslocal s3 ls
echo "Test Execution complete!"
cloud-pods-test:
name: 'Test Cloud Pods Action'
runs-on: ubuntu-latest
steps:
- name: ⚡️ Checkout the repository
uses: actions/checkout@v3

- name: Start LocalStack
uses: ./
with:
image-tag: 'latest'
install-awslocal: 'true'
use-pro: 'true'
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}

- name: Run AWS commands
run: |
awslocal s3 mb s3://test
awslocal sqs create-queue --queue-name test-queue
awslocal sns create-topic --name test-topic
ls
ls -a
- name: Save the Cloud Pod
uses: LocalStack/setup-localstack/cloud-pods@cloud-pods
with:
name: cloud-pods-test
action: save
31 changes: 31 additions & 0 deletions cloud-pods/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 'Save/Load a LocalStack Cloud Pod'

inputs:
name:
description: 'Name of the Cloud Pod'
required: true
default: 'cloud-pod'
action:
description: 'Action to perform (save or load)'
required: true
default: 'save'

runs:
using: "composite"
steps:
-
run: |
if [ "$ACTION" = "save" ]; then
echo "Saving Cloud Pod $NAME"
localstack pod save $NAME
elif [ "$ACTION" = "load" ]; then
echo "Loading Cloud Pod $NAME"
localstack pod load $NAME
else
echo "Invalid action: $ACTION"
exit 1
fi
shell: bash
env:
NAME: "$NAME"
ACTION: "${{ inputs.action }}"

0 comments on commit 97aa843

Please sign in to comment.