Merge pull request #145 from nao1215/dependabot/go_modules/aws-sdk-3b… #228
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to LocalStack | |
on: | |
push: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
- uses: unfor19/install-aws-cli-action@v1 | |
with: | |
version: 2 | |
verbose: false | |
- name: Setup localstack | |
env: | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }} | |
# https://docs.localstack.cloud/user-guide/ci/github-actions/ | |
run: | | |
docker compose up -d | |
echo "Waiting for LocalStack startup..." | |
sleep 30 | |
echo "Startup complete" | |
- name: Set up AWS config and AWS credentials | |
run: | | |
mkdir -p "$HOME/.aws" | |
echo -e "[default]\naws_access_key_id=test\naws_secret_access_key=test" > "$HOME/.aws/credentials" | |
echo -e "[default]\nregion=us-east-1\noutput=json\nendpoint_url=http://localhost:4566" > "$HOME/.aws/config" | |
- name: Setup samlocal | |
run: | | |
pip install aws-sam-cli-local | |
- name: Deploy to LocalStack | |
env: | |
AWS_DEFAULT_REGION: "us-east-1" | |
run: make deploy |