Deploy: PROD #17
This file contains 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: PROD" | |
concurrency: | |
group: deploy-prod-${{ github.repository }} | |
on: | |
workflow_dispatch: | |
inputs: | |
release-semver: | |
description: 'Enter the release version (e.g. 1.33.2).' | |
required: true | |
type: string | |
confirm: | |
description: 'Type "CONFIRM" to deploy to PROD.' | |
required: true | |
type: string | |
jobs: | |
workflow-inputs: | |
name: Display Workflow Inputs | |
if: ${{ github.event.inputs.confirm == 'CONFIRM' }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Output inputs | |
run: |- | |
echo "## Workflow inputs" >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
echo "${{ toJSON(github.event.inputs) }}" >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
workflow-props: | |
name: Workflow Properties | |
if: ${{ github.event.inputs.confirm == 'CONFIRM' }} | |
uses: slateci/github-actions/.github/workflows/workflow-props.yml@v17 | |
with: | |
helm_release_namespace: production | |
prod_git_ref: v${{ github.event.inputs.release-semver }} | |
checks: | |
name: Checks | |
if: ${{ github.event.inputs.confirm == 'CONFIRM' }} | |
needs: | |
- workflow-props | |
uses: slateci/github-actions/.github/workflows/chart-release-checks.yml@v17 | |
with: | |
helm_release_namespace: production | |
helm_release_prefix: slate-portal | |
prod_release_expected: ${{ github.event.inputs.release-semver }} | |
secrets: | |
gc_compute_zone: ${{ secrets.GCLOUD_COMPUTE_ZONE }} | |
gc_gke_cluster: ${{ secrets.GCLOUD_GKE_CLUSTER }} | |
gc_service_account: ${{ secrets.GCLOUD_SERVICE_ACCOUNT }} | |
gc_workload_identity_provider: ${{ secrets.GCLOUD_WORKLOAD_IDENTITY_PROVIDER }} | |
google: | |
name: Google Cloud | |
if: ${{ github.event.inputs.confirm == 'CONFIRM' }} | |
needs: | |
- checks | |
uses: slateci/github-actions/.github/workflows/helm-upgrade.yml@v17 | |
with: | |
helm_release_namespace: production | |
helm_release_prefix: slate-portal | |
secrets: | |
gc_compute_zone: ${{ secrets.GCLOUD_COMPUTE_ZONE }} | |
gc_gke_cluster: ${{ secrets.GCLOUD_GKE_CLUSTER }} | |
gc_service_account: ${{ secrets.GCLOUD_SERVICE_ACCOUNT }} | |
gc_workload_identity_provider: ${{ secrets.GCLOUD_WORKLOAD_IDENTITY_PROVIDER }} | |
notifications: | |
name: Notifications | |
runs-on: ubuntu-20.04 | |
needs: | |
- workflow-inputs | |
- workflow-props | |
- checks | |
if: ${{ always() && (needs.workflow-inputs.result == 'failure' || needs.workflow-props.result == 'failure' || needs.checks.result == 'failure' || needs.google.result == 'failure') }} | |
steps: | |
- name: Notify Slack of Failure | |
uses: slateci/github-actions/.github/actions/slack-notify-failure@v16 | |
with: | |
slack_bot_token: '${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}' |