Skip to content

Commit

Permalink
chore: Update Azure Bicep deployment workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubakimoto committed Jul 1, 2024
1 parent 7d3731b commit 3fc2807
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/azure-bicep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ name: Azure Bicep

on:
workflow_dispatch:
inputs:
delete-group:
description: 'Delete resource group after deployment'
required: false
default: false
type: boolean

permissions:
id-token: write
Expand All @@ -12,9 +18,6 @@ jobs:
deploy-bicep:
runs-on: ubuntu-latest
environment: Production
defaults:
run:
working-directory: 'bicep'
steps:
- uses: actions/checkout@v4

Expand All @@ -37,9 +40,14 @@ jobs:
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
resourceGroupName: ${{ steps.resourceGroup.outputs.group-name }}
template: ./main.bicep
template: ./bicep/main.bicep
parameters: 'storagePrefix=yuta storageSKU=Standard_LRS'
failOnStdErr: false

- name: Delete resource group
if: ${{ github.event.inputs.delete-group }}
run: |
az group delete --name ${{ steps.resourceGroup.outputs.group-name }} --yes --no-wait
- name: Az CLI Logout
run: az logout

0 comments on commit 3fc2807

Please sign in to comment.