Skip to content

Commit

Permalink
feat: Added deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
kojicmarko committed Mar 9, 2024
1 parent fc57c33 commit 3dc2844
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
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

0 comments on commit 3dc2844

Please sign in to comment.