Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name: "Build Ready For social Backend Develop"
- on:
- push:
- branches:
- - main
- paths:
- - readyforsocial/**
- - .github/workflows/dev-server.yml
- jobs:
- build:
- name: Build Image
- runs-on: ubuntu-latest
- steps:
- - name: Check out code
- uses: actions/checkout@v3
- - name: Configure AWS credentials
- 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: ${{ secrets.AWS_REGION }}
- - name: Login to Amazon ECR
- id: login-ecr
- uses: aws-actions/amazon-ecr-login@v1
- - name: Build, tag, and push image to Amazon ECR
- env:
- ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
- ECR_REPOSITORY: "social-post-server"
- IMAGE_TAG: "develop"
- run: |
- docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f 'readyforsocial/Dockerfile' .
- docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
- - name: Deploy final image to ecs
- run: aws ecs update-service --cluster regie-prod-fargate --service ready-for-social-develop --force-new-deployment
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement