ci.yml 889 B

12345678910111213141516171819202122232425262728293031323334
  1. name: CI
  2. on:
  3. push: {}
  4. pull_request: {}
  5. schedule:
  6. - cron: "0 12 * * 1" # Every Monday at 12:00 UTC
  7. env:
  8. AWS_ACCESS_KEY_ID: AKIA46X5W6CZEAQSMRH7
  9. jobs:
  10. ci:
  11. name: CI
  12. runs-on: ubuntu-latest
  13. steps:
  14. - name: Checkout the source code
  15. uses: actions/checkout@v2
  16. with:
  17. fetch-depth: 1
  18. - name: Test and build
  19. run: docker build -t triagebot .
  20. - name: Deploy to production
  21. uses: rust-lang/simpleinfra/github-actions/upload-docker-image@master
  22. with:
  23. image: triagebot
  24. repository: rust-triagebot
  25. region: us-west-1
  26. redeploy_ecs_cluster: rust-ecs-prod
  27. redeploy_ecs_service: triagebot
  28. aws_access_key_id: "${{ env.AWS_ACCESS_KEY_ID }}"
  29. aws_secret_access_key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
  30. if: github.ref == 'refs/heads/master'