Deploy to production #432
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Docs: https://docs.github.com/en/actions | |
| name: Deploy to production | |
| on: workflow_dispatch | |
| jobs: | |
| push-to-production: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden CI | |
| uses: step-security/[email protected] | |
| with: | |
| egress-policy: audit | |
| - name: Check user | |
| if: ${{ ! contains('["wsanchez", "mikeburg", "plapsley"]', github.actor) }} | |
| run: false | |
| - 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: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: System Python Information | |
| uses: twisted/python-info-action@v1 | |
| - name: Deploy to production | |
| run: ./bin/deploy production | |
| env: | |
| # https://github.com/burningmantech/ranger-ims-server/settings/secrets | |
| AWS_ECR_IMAGE_NAME: ${{ secrets.AWS_ECR_IMAGE_NAME }} | |
| AWS_ECS_CLUSTER_STAGING: rangers | |
| AWS_ECS_SERVICE_STAGING: ${{ secrets.AWS_ECS_SERVICE_STAGING }} | |
| AWS_ECS_CLUSTER_PRODUCTION: rangers | |
| AWS_ECS_SERVICE_PRODUCTION: ${{ secrets.AWS_ECS_SERVICE_PRODUCTION }} | |
| NOTIFY_SMTP_HOST: ${{ secrets.NOTIFY_SMTP_HOST }} | |
| NOTIFY_SMTP_USER: ${{ secrets.NOTIFY_SMTP_USER }} | |
| NOTIFY_SMTP_PASSWORD: ${{ secrets.NOTIFY_SMTP_PASSWORD }} | |
| NOTIFY_EMAIL_RECIPIENT: ${{ secrets.NOTIFY_EMAIL_RECIPIENT }} | |
| NOTIFY_EMAIL_SENDER: ${{ secrets.NOTIFY_EMAIL_SENDER }} | |
| CI: true | |
| PROJECT_NAME: Ranger Secret Clubhouse API Service | |
| REPOSITORY_ID: ${{ github.repository }} | |
| BUILD_NUMBER: 0 | |
| BUILD_URL: https://github.com/burningmantech/ranger-ims-server/commit/${{ github.sha }}/checks | |
| push-to-training: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden CI | |
| uses: step-security/[email protected] | |
| with: | |
| egress-policy: audit | |
| - name: Check user | |
| if: ${{ ! contains('["wsanchez", "mikeburg", "plapsley"]', github.actor) }} | |
| run: false | |
| - 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: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Install Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: System Python Information | |
| uses: twisted/python-info-action@v1 | |
| - name: Deploy to training | |
| run: ./bin/deploy production | |
| env: | |
| # https://github.com/burningmantech/ranger-ims-server/settings/secrets | |
| AWS_ECR_IMAGE_NAME: ${{ secrets.AWS_ECR_IMAGE_NAME }} | |
| AWS_ECS_CLUSTER_STAGING: rangers | |
| AWS_ECS_SERVICE_STAGING: ${{ secrets.AWS_ECS_SERVICE_STAGING }} | |
| AWS_ECS_CLUSTER_PRODUCTION: rangers | |
| AWS_ECS_SERVICE_PRODUCTION: ${{ secrets.AWS_ECS_SERVICE_TRAINING }} | |
| NOTIFY_SMTP_HOST: ${{ secrets.NOTIFY_SMTP_HOST }} | |
| NOTIFY_SMTP_USER: ${{ secrets.NOTIFY_SMTP_USER }} | |
| NOTIFY_SMTP_PASSWORD: ${{ secrets.NOTIFY_SMTP_PASSWORD }} | |
| NOTIFY_EMAIL_RECIPIENT: ${{ secrets.NOTIFY_EMAIL_RECIPIENT }} | |
| NOTIFY_EMAIL_SENDER: ${{ secrets.NOTIFY_EMAIL_SENDER }} | |
| CI: true | |
| PROJECT_NAME: Ranger Secret Clubhouse API Service | |
| REPOSITORY_ID: ${{ github.repository }} | |
| BUILD_NUMBER: 0 | |
| BUILD_URL: https://github.com/burningmantech/ranger-ims-server/commit/${{ github.sha }}/checks |