Skip to content

ci: refactor deployment of infrastructure and add PR validation #83

ci: refactor deployment of infrastructure and add PR validation

ci: refactor deployment of infrastructure and add PR validation #83

Workflow file for this run

name: PullRequest
on:
pull_request:
branches: [main]
paths-ignore:
- "tests/k6/**"
jobs:
check-for-changes:
name: Check for changes
uses: ./.github/workflows/CheckForChanges.yml
build:
uses: ./.github/workflows/BuildAndTest.yml
needs: ["check-for-changes"]
if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' }}
build-infrastructure:
uses: ./.github/workflows/BuildInfrastructure.yml
needs: ["check-for-changes"]
if: ${{ needs.check-for-changes.outputs.hasAzureChanges == 'true' }}
secrets:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
with:
environment: "test"
dry-run-deploy:
uses: ./.github/workflows/Deploy.yml
needs: ["check-for-changes", "build-infrastructure"]
if: ${{ needs.check-for-changes.outputs.hasAzureChanges == 'true' }}
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 }}
APIM_DIGDIR_EMAIL: ${{ secrets.APIM_DIGDIR_EMAIL }}
with:
environment: test
region: norwayeast
dryRun: true