File tree Expand file tree Collapse file tree 3 files changed +29
-14
lines changed Expand file tree Collapse file tree 3 files changed +29
-14
lines changed Original file line number Diff line number Diff line change 6
6
workflow_dispatch :
7
7
8
8
jobs :
9
- main :
9
+ update-samples :
10
10
name : Update Samples
11
+ permissions :
12
+ contents : write
11
13
runs-on : ubuntu-latest
12
14
13
15
env :
@@ -19,21 +21,26 @@ jobs:
19
21
with :
20
22
fetch-depth : 0 # avoid shallow clone so nbgv can do its work.
21
23
24
+ - name : Setup .NET Core
25
+ uses : actions/setup-dotnet@v4
26
+
27
+ - name : Clone quickstarts
28
+ uses : actions/checkout@v4
29
+ with :
30
+ repository : Azure/azure-quickstart-templates
31
+ path : workflow-temp/azure-quickstart-templates
32
+
22
33
- name : Update Samples
23
34
shell : pwsh
24
- run : ./scripts/UpdateSamples.ps1
35
+ run : ./scripts/UpdateSamples.ps1 -QuickStartsRepoPath workflow-temp/azure-quickstart-templates
25
36
26
37
- name : Update Baselines
27
38
run : ./scripts/update_baselines.sh
28
-
29
- - name : Create Pull Request
30
- uses : peter-evans/create-pull-request@v7
39
+ # this will fail if there are changes - this is expected
40
+ continue-on-error : true
41
+
42
+ - name : Commit and push
43
+ uses : stefanzweifel/git-auto-commit-action@v5
31
44
with :
32
- committer :
GitHub <[email protected] >
33
- author : ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
34
- signoff : false
35
- branch : update-samples
36
- delete-branch : true
37
- title : |
38
- Update Quickstart & AVM Sample Links
39
- draft : false
45
+ commit_message : Update Quickstart & AVM samples
46
+ file_pattern : settings/samples src/TemplateRefGenerator.Tests/Files
Original file line number Diff line number Diff line change @@ -396,3 +396,6 @@ FodyWeavers.xsd
396
396
397
397
# JetBrains Rider
398
398
* .sln.iml
399
+
400
+ # Temporary directory for GitHub workflows to use
401
+ /workflow-temp
Original file line number Diff line number Diff line change @@ -29,7 +29,12 @@ function GetQuickstartLinks {
29
29
$metadataPaths = Get-ChildItem $QuickStartsRepoPath - File - Recurse - Include " metadata.json" | Sort-Object FullName
30
30
foreach ($metadataPath in $metadataPaths ) {
31
31
Write-Host " Processing $metadataPath "
32
- $templatePath = Join-Path $metadataPath.DirectoryName " azuredeploy.json" - Resolve
32
+ $templatePath = Join-Path $metadataPath.DirectoryName " azuredeploy.json"
33
+ if (-not (Test-Path $templatePath - PathType Leaf)) {
34
+ Write-Host " No template found for $metadataPath "
35
+ continue
36
+ }
37
+
33
38
$bicepPath = Join-Path $metadataPath.DirectoryName " main.bicep"
34
39
$hasBicep = (Test-Path $bicepPath - PathType Leaf)
35
40
You can’t perform that action at this time.
0 commit comments