Skip to content

Commit 082daee

Browse files
committed
Add action to ensure changes are persisted
1 parent 2e618f2 commit 082daee

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Verify ultimate-pipeline.yml changes have been persisted
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
verify_solution_changes_are_persisted:
9+
runs-on: windows-latest
10+
permissions:
11+
contents: read
12+
13+
steps:
14+
- name: Support longpaths
15+
run: git config --system core.longpaths true
16+
17+
- name: Checkout
18+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19+
20+
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
21+
with:
22+
dotnet-version: '9.0.203'
23+
24+
- name: "Running GenerateUpdateGitHubPipelineStep"
25+
run: .\tracer\build.ps1 GenerateUpdateGitHubPipelineStep
26+
27+
- name: "Verify no changes in generated templates"
28+
run: |
29+
git diff --quiet -- .\.azure-pipelines\steps\update-github-pipeline-status.yml
30+
if ($LASTEXITCODE -eq 1) {
31+
git diff
32+
Write-Error "Found changes in generated template. Did you change the stages in ultimate-pipeline? Regenerate the template locally by running the target 'GenerateUpdateGitHubPipelineStep', and ensure the changed files are committed to git."
33+
Exit 1
34+
} else {
35+
echo "No changes found to generated template"
36+
}

0 commit comments

Comments
 (0)