on: workflow_call: inputs: environment: required: true type: string jobs: deploy: environment: name: ${{ env.environment }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: azure/login@v1 with: creds: ${{ env.AZURE_CREDENTIALS }} - name: Deploy Bicep template uses: azure/powershell@v1 with: azPSVersion: "3.1.0" inlineScript: | az deployment group create -n ghaction -g ${{ env.AZURE_RESOURCE_GROUP_NAME }} --template-file deploy/Web/web.bicep --parameters webAppName=${{ env.WEBAPP_NAME }} servicePlanName=${{ env.SERVICE_PLAN_NAME }} servicePlanSku=${{ env.SERVICE_PLAN_SKU }} hubWebAppName=${{ env.HUB_WEBAPP_NAME }} - name: Download web artifacts uses: actions/download-artifact@v3 with: name: drop path: web - name: Azure WebApp uses: Azure/webapps-deploy@v2 with: app-name: ${{ secrets.WEBAPP_NAME }} package: web