-
Notifications
You must be signed in to change notification settings - Fork 755
44 lines (34 loc) · 1.17 KB
/
update-baselines.yml
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
42
43
44
name: Update Baselines
# This action can be run on-demand against a branch.
# It attempts to update the baseline files, and commits and pushes changes if there are any.
on:
workflow_dispatch:
jobs:
main:
name: Update Baselines
runs-on: ubuntu-latest
permissions:
contents: write
env:
# don't print dotnet logo
DOTNET_NOLOGO: true
# disable telemetry (reduces dotnet tool output in logs)
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
- name: Test
continue-on-error: true
run: dotnet test --filter "TestCategory=Baseline" -- 'TestRunParameters.Parameter(name="SetBaseLine", value="true")'
- name: Commit baselines
run: |
git config --global user.email "[email protected]"
git config --global user.name "Bicep Automation"
git add .
if ! git diff-index --quiet HEAD --; then
git commit -m "Update test baselines"
git push
fi