-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fe7c80
commit 517bdcf
Showing
17 changed files
with
973 additions
and
1,457 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy Lambda - Obtener datos y publica en tópico SNS | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker image | ||
env: | ||
DOCKER_REPO: guillevalin/app-getandpublish | ||
LAMBDA_IMAGE_TAG: "latest" | ||
run: | | ||
cd app-getandpublish | ||
docker build -t $DOCKER_REPO:$LAMBDA_IMAGE_TAG . | ||
docker push $DOCKER_REPO:$LAMBDA_IMAGE_TAG | ||
- name: Set up AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws_region: "us-east-1" | ||
|
||
- name: Deploy to AWS Lambda | ||
env: | ||
LAMBDA_FUNCTION_NAME: "app-getandpublish" | ||
LAMBDA_ROLE: ${{ secrets.LAMBDA_ROLE }} | ||
DOCKER_REPO_URI: "guillevalin/app-getandpublish:latest" | ||
run: | | ||
aws lambda create-function \ | ||
--function-name $LAMBDA_FUNCTION_NAME \ | ||
--package-type Image \ | ||
--code ImageUri=$DOCKER_REPO_URI \ | ||
--role $LAMBDA_ROLE \ | ||
--region us-east-1 \ | ||
|| aws lambda update-function-code \ | ||
--function-name $LAMBDA_FUNCTION_NAME \ | ||
--image-uri $DOCKER_REPO_URI \ | ||
--region us-east-1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy Lambda - Suscriptor a tópico SNS | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push Docker image | ||
env: | ||
DOCKER_REPO: guillevalin/app-suscriptor | ||
LAMBDA_IMAGE_TAG: "latest" | ||
run: | | ||
cd app-suscriptor | ||
docker build -t $DOCKER_REPO:$LAMBDA_IMAGE_TAG . | ||
docker push $DOCKER_REPO:$LAMBDA_IMAGE_TAG | ||
- name: Set up AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws_region: "us-east-1" | ||
|
||
- name: Deploy to AWS Lambda | ||
env: | ||
LAMBDA_FUNCTION_NAME: "app-suscriptor" | ||
LAMBDA_ROLE: ${{ secrets.LAMBDA_ROLE }} | ||
DOCKER_REPO_URI: "guillevalin/app-suscriptor:latest" | ||
run: | | ||
aws lambda create-function \ | ||
--function-name $LAMBDA_FUNCTION_NAME \ | ||
--package-type Image \ | ||
--code ImageUri=$DOCKER_REPO_URI \ | ||
--role $LAMBDA_ROLE \ | ||
--region us-east-1 \ | ||
|| aws lambda update-function-code \ | ||
--function-name $LAMBDA_FUNCTION_NAME \ | ||
--image-uri $DOCKER_REPO_URI \ | ||
--region us-east-1 |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.