generated from pamelafox/simple-flask-server-example
-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (35 loc) · 972 Bytes
/
azure-bicep.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Bicep scripts
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
if: ${{ github.event_name == 'pull_request'}}
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Checkout branch
if: ${{ github.event_name == 'push'}}
uses: actions/checkout@v2
- name: Build Bicep
uses: azure/CLI@v1
with:
inlineScript: az bicep build -f infra/main.bicep
- name: Format Bicep
uses: azure/CLI@v1
with:
inlineScript: az bicep format -f infra/main.bicep
- name: Add updated Bicep files to commit
uses: EndBug/add-and-commit@v9
with:
message: 'Update Bicep files'
add: '*.bicep'