Skip to content

Commit 0487b7b

Browse files
fix: Fixed name generation for GH branches used by AVM features table gen (#2420)
Co-authored-by: cae-pr-creator[bot] <126156663+cae-pr-creator[bot]@users.noreply.github.com>
1 parent 8c8be94 commit 0487b7b

File tree

3 files changed

+381
-361
lines changed

3 files changed

+381
-361
lines changed

.github/workflows/platform.updateModuleRegistryTables.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
env:
99
pipelinePrincipalGitUserName: "AVMPipelinePrincipal"
1010
pipelinePrincipalGitUserEmail: "AVM@noreply.github.com"
11-
branch_name: "update-module-features-table_${{ github.event.repository.updated_at}}"
11+
branch_name: "update-module-features-table"
1212
pr_title: "Update module features table (automated)"
1313
pr_body: "This is an automated ``pull_request`` containing updates to the module status badges table that is stored at ``docs/content/indexes/bicep/_index.md``, as well as the module features CSV stored at ``docs/static/module-features/bicepFeatures.csv``.\nPlease review the ``files changed`` tab to review changes."
1414

@@ -46,6 +46,14 @@ jobs:
4646
git config --global user.name '${{ env.pipelinePrincipalGitUserEmail }}'
4747
git config --global user.email '${{ env.pipelinePrincipalGitUserName }}'
4848
49+
- name: Format branch name
50+
shell: pwsh
51+
run: |
52+
$rawBranch = '${{ env.branch_name }}'
53+
$formattedBranch = "{0}_{1}" -f $rawBranch, (Get-Date).ToString('yyyy-MM-dd-HH-mm-ss')
54+
Write-Verbose "Adjusting branch name [$rawBranch] to [$formattedBranch]" -Verbose
55+
('{0}={1}' -f 'branch_name', $formattedBranch) | Out-File -FilePath $env:GITHUB_ENV -Encoding 'utf8' # Overwrite env variable
56+
4957
- name: Create and checkout branch
5058
run: |
5159
BRANCH_URL="repos/${{ github.repository }}/branches"

0 commit comments

Comments
 (0)