Skip to content

Commit

Permalink
ci: add dispatch for infrastructure (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
arealmaas authored Feb 27, 2024
1 parent f476fa0 commit 21b2401
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/dispatch-infrastructure.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Dispatch infrastructure

on:
workflow_dispatch:
inputs:
environment:
description: "Environment to deploy to"
required: true
default: "test"
type: choice
options:
- test
- staging
- prod

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}

jobs:
generate-git-short-sha:
name: Generate git short sha
uses: ./.github/workflows/action-generate-git-short-sha.yml

deploy-infra-test:
name: Deploy infra to test
needs: [generate-git-short-sha]
uses: ./.github/workflows/action-deploy-infra.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 }}
with:
environment: ${{ inputs.environment }}
region: norwayeast
gitShortSha: ${{ needs.generate-git-short-sha.outputs.gitShortSha }}

0 comments on commit 21b2401

Please sign in to comment.