Skip to content

Commit

Permalink
ci: implement definition update and readme for alz (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-FFFFFF authored Oct 11, 2024
1 parent bf992bd commit ed938b1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/update-alz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ jobs:
"${{ github.workspace }}/${{ env.remote_repository }}/src/resources/Microsoft.Authorization/policySetDefinitions" \
"${{ github.workspace }}/${{ github.repository }}/${{ env.library_dir }}/policy_set_definitions"
- name: Update library policy definitions in archetype definitions
uses: azure/powershell@53dd145408794f7e80f97cfcca04155c85234709 # v2.0.0
with:
inlineScript: |
Write-Information "==> Running policy definitions in archetype definitions script..." -InformationAction Continue
${{ github.repository }}/platform/alz/scripts/Invoke-LibraryUpdatePolicyDefinitions.ps1 `
-AlzToolsPath "${{ github.workspace }}/${{ env.remote_repository }}/src/Alz.Tools/" `
-TargetPath "${{ github.workspace }}/${{ github.repository }}" `
-SourcePath "${{ github.workspace }}/${{ env.remote_repository }}"
azPSVersion: "latest"

- name: Update library policy assignments and archetypes
uses: azure/powershell@53dd145408794f7e80f97cfcca04155c85234709 # v2.0.0
with:
Expand All @@ -99,6 +110,12 @@ jobs:
echo "changes=${#CHECK_GIT_STATUS[@]}" >> "$GITHUB_OUTPUT"
working-directory: ${{ github.workspace }}/${{ github.repository }}

- name: Regerate README.md
if: steps.git_status.outputs.changes > 0
run: |
alzlibtool document library . >README.md
working-directory: ${{ github.repository }}

- name: Add files, commit and push
if: steps.git_status.outputs.changes > 0
run: |
Expand Down

0 comments on commit ed938b1

Please sign in to comment.