Drift Audit #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Drift Audit | |
| # Monthly org-wide audit of every AzureLocal repo against canonical platform standards. | |
| # Runs Invoke-RepoAudit.ps1 and files a 'drift-report' issue when repos have drifted. | |
| on: | |
| schedule: | |
| # 09:00 UTC on the 1st of every month | |
| - cron: '0 9 1 * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| issues: write | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run Invoke-RepoAudit.ps1 | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| Import-Module ./modules/powershell/AzureLocal.Common/AzureLocal.Common.psd1 -Force | |
| ./repo-management/org-scripts/Invoke-RepoAudit.ps1 ` | |
| -Org AzureLocal ` | |
| -EmitIssue ` | |
| -OutputPath drift-report.json | |
| - name: Upload drift report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: drift-report-${{ github.run_id }} | |
| path: drift-report.json | |
| retention-days: 90 |