Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
πŸ’š Repo secrets in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
omfj committed Nov 7, 2023
1 parent c47761d commit a15b65a
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_cms.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Build CMS

on:
pull_request:
branches: [master]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cypress_component_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Cypress component tests

on:
pull_request:
branches: [master]
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Deploy backend

on:
push:
branches: [master]
Expand All @@ -16,10 +17,10 @@ env:
TF_VAR_auth_secret: ${{ secrets.AUTH_SECRET }}
TF_VAR_sendgrid_api_key: ${{ secrets.SENDGRID_API_KEY }}
TF_VAR_revision_suffix: ${{ github.sha }}
ARM_CLIENT_ID: 225cb793-e592-482e-8612-2318bd5e0a6c
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: f16e6916-1e71-42a0-9df3-0246b805f432
ARM_TENANT_ID: 10086e44-d4c5-4039-ab23-dc49610f7879
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}

jobs:
docker_push_backend:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/destroy_previews.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Destroy backend preview

on:
pull_request:
branches: [master]
Expand Down Expand Up @@ -57,8 +58,8 @@ jobs:
TF_VAR_backend_image: '$IMAGE_NAME/backend:$BACKEND_TAG'
TF_VAR_admin_key: ${{ secrets.ADMIN_KEY_DEV }}
TF_VAR_auth_secret: ${{ secrets.AUTH_SECRET }}
ARM_CLIENT_ID: 225cb793-e592-482e-8612-2318bd5e0a6c
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: f16e6916-1e71-42a0-9df3-0246b805f432
ARM_TENANT_ID: 10086e44-d4c5-4039-ab23-dc49610f7879
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
WORKSPACE_NAME: ${{ steps.env_vars.outputs.BRANCH_NAME_FORMATTED }}
7 changes: 4 additions & 3 deletions .github/workflows/docker_tests_and_previews.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Docker tests & previews

on:
pull_request:
branches: [master]
Expand Down Expand Up @@ -290,10 +291,10 @@ jobs:
TF_VAR_db_password: ${{ secrets.DB_PASSWORD_DEV }}
TF_VAR_backend_image: '${{ env.IMAGE_NAME }}/backend:${{ steps.env_vars.outputs.BACKEND_TAG }}'
TF_VAR_auth_secret: ${{ secrets.AUTH_SECRET }}
ARM_CLIENT_ID: 225cb793-e592-482e-8612-2318bd5e0a6c
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: f16e6916-1e71-42a0-9df3-0246b805f432
ARM_TENANT_ID: 10086e44-d4c5-4039-ab23-dc49610f7879
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
WORKSPACE_NAME: ${{ steps.env_vars.outputs.BRANCH_NAME_FORMATTED }}

- name: Find comment
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ktlint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: ktlint

on:
pull_request:
branches: [master]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint_format.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Lint & format

on:
pull_request:
branches: [master]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/psql_check.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Check SQL migration syntax

on:
pull_request:
branches: [master]
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/restart_backend_preview.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: Restart backend preview

on:
issue_comment:
types: [edited]

env:
ARM_CLIENT_ID: 225cb793-e592-482e-8612-2318bd5e0a6c
ARM_SUBSCRIPTION_ID: f16e6916-1e71-42a0-9df3-0246b805f432
ARM_TENANT_ID: 10086e44-d4c5-4039-ab23-dc49610f7879

jobs:
restart_preview:
name: 'Restart backend preview'
Expand Down Expand Up @@ -40,7 +36,7 @@ jobs:
- name: Sign in to Azure
uses: azure/login@v1
with:
creds: '{"clientId":"${{ env.ARM_CLIENT_ID }}","clientSecret":"${{ secrets.ARM_CLIENT_SECRET }}","subscriptionId":"${{ env.ARM_SUBSCRIPTION_ID }}","tenantId":"${{ env.ARM_TENANT_ID }}"}'
creds: '{"clientId":"${{ secrets.ARM_CLIENT_ID }}","clientSecret":"${{ secrets.ARM_CLIENT_SECRET }}","subscriptionId":"${{ secrets.ARM_SUBSCRIPTION_ID }}","tenantId":"${{ secrets.ARM_TENANT_ID }}"}'

- name: Restart container
if: contains(${{ steps.fc.outputs.comment_body }}, '- [x] check this box to restart the backend preview, if you are getting errors.')
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sanity_deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Deploy to Sanity Studio

on:
push:
branches: [master]
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/terraform_format_plan.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Terraform format & plan

on:
pull_request:
branches: [master]
Expand All @@ -18,10 +19,10 @@ env:
TF_VAR_auth_secret: ${{ secrets.AUTH_SECRET }}
TF_VAR_sendgrid_api_key: ${{ secrets.SENDGRID_API_KEY }}
TF_VAR_revision_suffix: ${{ github.sha }}
ARM_CLIENT_ID: 225cb793-e592-482e-8612-2318bd5e0a6c
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: f16e6916-1e71-42a0-9df3-0246b805f432
ARM_TENANT_ID: 10086e44-d4c5-4039-ab23-dc49610f7879
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}

jobs:
terraform_format:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/terraform_format_plan_pass.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Terraform format & plan

on:
pull_request:
branches: [master]
Expand Down

0 comments on commit a15b65a

Please sign in to comment.