Advertisement
Altair200333

Untitled

Aug 15th, 2022
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. name: "Build Ready For social Backend Develop"
  2.  
  3. on:
  4. push:
  5. branches:
  6. - main
  7. paths:
  8. - readyforsocial/**
  9. - .github/workflows/dev-server.yml
  10.  
  11. jobs:
  12. build:
  13. name: Build Image
  14. runs-on: ubuntu-latest
  15.  
  16. steps:
  17. - name: Check out code
  18. uses: actions/checkout@v3
  19.  
  20. - name: Configure AWS credentials
  21. uses: aws-actions/configure-aws-credentials@v1
  22. with:
  23. aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
  24. aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  25. aws-region: ${{ secrets.AWS_REGION }}
  26.  
  27. - name: Login to Amazon ECR
  28. id: login-ecr
  29. uses: aws-actions/amazon-ecr-login@v1
  30.  
  31. - name: Build, tag, and push image to Amazon ECR
  32. env:
  33. ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
  34. ECR_REPOSITORY: "social-post-server"
  35. IMAGE_TAG: "develop"
  36. run: |
  37. docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f 'readyforsocial/Dockerfile' .
  38. docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
  39. - name: Deploy final image to ecs
  40. 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