Chore/rotate keys (#39) #17
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
| name: Deploy evently | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| # important for azure/login | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Azure Login | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Validate Azure CLI can be used | |
| uses: azure/cli@v2 | |
| with: | |
| azcliversion: latest | |
| inlineScript: | | |
| az account show | |
| - name: Set up Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| - name: Terraform init | |
| run: | | |
| cd deploy/Terraform | |
| terraform init | |
| - name: Terraform validate | |
| run: | | |
| cd deploy/Terraform | |
| terraform validate | |
| - name: Terraform plan | |
| run: | | |
| cd deploy/Terraform | |
| terraform plan | |
| env: | |
| TF_VAR_sql_admin_username: ${{ secrets.TF_VAR_SQL_ADMIN_USERNAME }} | |
| TF_VAR_sql_admin_password: ${{ secrets.TF_VAR_SQL_ADMIN_PASSWORD }} | |
| TF_VAR_google_client_id: ${{ secrets.TF_VAR_GOOGLE_CLIENT_ID }} | |
| TF_VAR_google_client_secret: ${{ secrets.TF_VAR_GOOGLE_CLIENT_SECRET }} | |
| TF_VAR_email_from: ${{ secrets.TF_VAR_EMAIL_FROM }} | |
| TF_VAR_smtp_password: ${{ secrets.TF_VAR_SMTP_PASSWORD }} | |
| # Apply step can be skipped for pull requests | |
| - name: Terraform apply | |
| run: cd deploy/Terraform && terraform apply -auto-approve | |
| env: | |
| TF_VAR_sql_admin_username: ${{ secrets.TF_VAR_SQL_ADMIN_USERNAME }} | |
| TF_VAR_sql_admin_password: ${{ secrets.TF_VAR_SQL_ADMIN_PASSWORD }} | |
| TF_VAR_google_client_id: ${{ secrets.TF_VAR_GOOGLE_CLIENT_ID }} | |
| TF_VAR_google_client_secret: ${{ secrets.TF_VAR_GOOGLE_CLIENT_SECRET }} | |
| TF_VAR_email_from: ${{ secrets.TF_VAR_EMAIL_FROM }} | |
| TF_VAR_smtp_password: ${{ secrets.TF_VAR_SMTP_PASSWORD }} | |