-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (41 loc) · 1.62 KB
/
dispatch-deploy-infrastructure.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Dispatch Deploy Infrastructure
on:
workflow_dispatch:
inputs:
environment:
description: "Environment to deploy to"
required: true
default: "test"
type: choice
options:
- test
- staging
- prod
version:
description: "Version to deploy. Needs to be a git tag (exclude the v prefix)"
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ inputs.environment }}
jobs:
generate-git-short-sha:
name: Generate git short sha
uses: ./.github/workflows/workflow-generate-git-short-sha.yml
deploy-infra:
name: Deploy infra to ${{ inputs.environment }}
needs: [generate-git-short-sha]
uses: ./.github/workflows/workflow-deploy-infrastructure.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }}
AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }}
AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }}
AZURE_CERTIFICATE_KEY_VAULT_NAME: ${{ secrets.AZURE_CERTIFICATE_KEY_VAULT_NAME }}
AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SSH_JUMPER_SSH_PUBLIC_KEY }}
with:
environment: ${{ inputs.environment }}
region: norwayeast
version: ${{ inputs.version }}
ref: "refs/tags/v${{ inputs.version }}"