Skip to content

Commit

Permalink
ci: enable dispatch of apps (#751)
Browse files Browse the repository at this point in the history
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

Adding a dispatch to be able to deploy apps given a version and
environment input value

## Related Issue(s)

- #{issue number}

## Verification

- [ ] **Your** code builds clean without any errors or warnings
- [ ] Manual testing done (required)
- [ ] Relevant automated test added (if you find this hard, leave it and
we'll help out)

## Documentation

- [ ] Documentation is updated (either in `docs`-directory, Altinnpedia
or a separate linked PR in
[altinn-studio-docs.](https://github.com/Altinn/altinn-studio-docs), if
applicable)
  • Loading branch information
arealmaas authored May 22, 2024
1 parent d6fb439 commit f38f834
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/dispatch-apps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Dispatch Apps

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"
required: true
type: string
runMigration:
description: "Whether to run migration or not"
default: false
required: false
type: boolean

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

get-current-version:
name: Get current version
uses: ./.github/workflows/action-get-current-version.yml

check-for-changes:
name: Check for changes
uses: ./.github/workflows/action-check-for-changes.yml

deploy-apps:
name: Deploy apps to ${{ inputs.environment }}
needs:
- generate-git-short-sha
- get-current-version
- check-for-changes
uses: ./.github/workflows/action-deploy-apps.yml
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
AZURE_RESOURCE_GROUP_NAME: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
AZURE_ENVIRONMENT_KEY_VAULT_NAME: ${{ secrets.AZURE_ENVIRONMENT_KEY_VAULT_NAME }}
AZURE_CONTAINER_APP_ENVIRONMENT_NAME: ${{ secrets.AZURE_CONTAINER_APP_ENVIRONMENT_NAME }}
AZURE_APP_INSIGHTS_CONNECTION_STRING: ${{ secrets.AZURE_APP_INSIGHTS_CONNECTION_STRING }}
AZURE_APP_CONFIGURATION_NAME: ${{ secrets.AZURE_APP_CONFIGURATION_NAME }}
with:
environment: ${{ inputs.environment }}
region: norwayeast
version: ${{ inputs.version }}
runMigration: ${{ inputs.runMigration }}

0 comments on commit f38f834

Please sign in to comment.