Skip to content

Repository Maintenance #66

Repository Maintenance

Repository Maintenance #66

Workflow file for this run

name: Repository Maintenance
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
maintenance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache PowerShell modules
uses: potatoqualitee/psmodulecache@v6.2.1
with:
modules-to-cache: PSScriptAnalyzer
- name: Run cleanup script
shell: pwsh
run: ./scripts/CleanupTempFiles.ps1
- name: Check outdated modules
shell: pwsh
run: |
. ./SupportToolsLoader.ps1
$outdated = Get-InstalledModule | Where-Object { $_.UpdateAvailable }
if ($outdated) {
$outdated | Format-Table Name, Version, LatestVersion
} else {
Write-STStatus 'All modules are up to date.' -Level INFO -Log
}
- name: Lint with PSScriptAnalyzer
shell: pwsh
run: |
Invoke-ScriptAnalyzer -Path . -Recurse -Severity Warning,Error