diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 03feb98..523fbea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,6 +35,7 @@ jobs: - name: Build & Push working-directory: infrastructure run: | + bicep build-params prod.main.bicepparam bicep build-params test.main.bicepparam az bicep build --file main.bicep - name: Publish Artifact @@ -43,7 +44,7 @@ jobs: name: bicep-templates path: infrastructure/*.json - infrastructure-incremental: + test-deployment: needs: [publish-bicep, versionize] runs-on: ubuntu-latest steps: @@ -65,3 +66,24 @@ jobs: uses: Azure/cli@v1 with: inlineScript: az deployment sub create --name wam-integration-northeur --location northeurope --template-file ./infrastructure/main.json --parameters ./infrastructure/test.main.json + + production-deployment: + needs: [publish-bicep, versionize] + runs-on: ubuntu-latest + steps: + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: bicep-templates + path: ./infrastructure + - name: Az CLI login + uses: azure/login@v1 + with: + client-id: ${{ secrets.WAM_PRD_CLIENT_ID }} + tenant-id: ${{ secrets.WAM_PRD_TENANT_ID }} + subscription-id: ${{ secrets.WAM_PRD_SUBSCRIPTION_ID }} + - name: Deploy Infrastructure + id: arm + uses: Azure/cli@v1 + with: + inlineScript: az deployment sub create --name wam-integration-northeur --location northeurope --template-file ./infrastructure/main.json --parameters ./infrastructure/prod.main.json diff --git a/infrastructure/prod.main.bicepparam b/infrastructure/prod.main.bicepparam new file mode 100644 index 0000000..5da0f92 --- /dev/null +++ b/infrastructure/prod.main.bicepparam @@ -0,0 +1,4 @@ +using './main.bicep' + +param runtimeEnvironment = 'prd' +param appBuildersGroup = '397a477e-c6d9-49ff-8652-b434a7a90a82'