Skip to content

Commit d5c28a7

Browse files
committed
Setup Deploy Bicep Action
1 parent 06e6af7 commit d5c28a7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/deploy-bicep.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy Bicep to Azure
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Setup Azure CLI
17+
uses: azure/CLI@v1
18+
19+
- name: Login to Azure
20+
uses: azure/login@v1
21+
with:
22+
creds: ${{ secrets.AZURE_CREDENTIALS }}
23+
24+
- name: Install Bicep CLI
25+
run: az bicep install
26+
27+
- name: Build Bicep files
28+
run: az bicep build --file DemoEnvironment.bicep
29+
30+
- name: Deploy Bicep files
31+
run: az deployment group create --resource-group dd2482-demo-rg --template-file DemoEnvironment.json - -parameters DemoEnvironment.parameters.json --mode Complete

0 commit comments

Comments
 (0)