Skip to content

Commit 21b2401

Browse files
authored
ci: add dispatch for infrastructure (#495)
1 parent f476fa0 commit 21b2401

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Dispatch infrastructure
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: "Environment to deploy to"
8+
required: true
9+
default: "test"
10+
type: choice
11+
options:
12+
- test
13+
- staging
14+
- prod
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref_name }}
18+
19+
jobs:
20+
generate-git-short-sha:
21+
name: Generate git short sha
22+
uses: ./.github/workflows/action-generate-git-short-sha.yml
23+
24+
deploy-infra-test:
25+
name: Deploy infra to test
26+
needs: [generate-git-short-sha]
27+
uses: ./.github/workflows/action-deploy-infra.yml
28+
secrets:
29+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
30+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
31+
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
32+
AZURE_SOURCE_KEY_VAULT_NAME: ${{ secrets.AZURE_SOURCE_KEY_VAULT_NAME }}
33+
AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID: ${{ secrets.AZURE_SOURCE_KEY_VAULT_SUBSCRIPTION_ID }}
34+
AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP: ${{ secrets.AZURE_SOURCE_KEY_VAULT_RESOURCE_GROUP }}
35+
with:
36+
environment: ${{ inputs.environment }}
37+
region: norwayeast
38+
gitShortSha: ${{ needs.generate-git-short-sha.outputs.gitShortSha }}

0 commit comments

Comments
 (0)