Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added deployment #4

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Build and Publish Docker image

name: "Build and Publish Docker image"
on:
push:
branches: [main]
workflow_run:
workflows: ["Lint and Test"]
types:
- completed

jobs:
build-and-publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/deploy-lambda.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
name: Deploy AWS Lambda

name: "Deploy AWS Lambda"
on:
pull_request:
types: [closed]
branches: [main]



jobs:
deploy-lambda:
if: ${{ github.event.pull_request.merged == true }}
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/deploy-to-ecs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Deploy container to AWS ECS"
on:
pull_request:
types: [closed]
branches: [main]
jobs:
deploy-to-ecs:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Deploy to ECS
run: |
aws ecs update-service --cluster ${{ secrets.ECS_CLUSTER }} --service ${{ secrets.ECS_SERVICE }} --force-new-deployment
Loading