Skip to content

📖 [Docs]: Automatically generate API coverage report #3

📖 [Docs]: Automatically generate API coverage report

📖 [Docs]: Automatically generate API coverage report #3

name: Update coverage report
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: write
jobs:
Update-Coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update coverage report
uses: PSModule/GitHub-Script@v1
with:
Script: |
. ".\scripts\Set-Coverage-Raport.ps1" -Verbose
LogGroup 'Updated files' {
$changedFiles = git diff --name-only
$changedFiles
# if (-not $changedFiles) {
# Write-Host 'No automated changes detected'
# return
# }
}
git add .
Write-Host '::group::Changed files [$($changedFiles.Count)]'
$changedFiles | ForEach-Object { Write-Host $_ }
Write-Host '::endgroup::'
git commit -m "Auto-generated changes"
git push