Skip to content

Update Microsoft Surface Driver Pack Catalog #261

Update Microsoft Surface Driver Pack Catalog

Update Microsoft Surface Driver Pack Catalog #261

name: Update Microsoft Surface Driver Pack Catalog
on:
workflow_dispatch:
schedule:
- cron: '0 */4 * * *'
permissions:
contents: write
jobs:
update:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: main
- name: Update Surface driver pack catalog
id: update
shell: pwsh
run: |
.\.github\scripts\Update-MicrosoftCatalog.ps1 -JsonPath 'OSDCloud\core\driverpacks\surface.json'
- name: Commit if changed
if: steps.update.outputs.changed == 'true'
shell: pwsh
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add OSDCloud/core/driverpacks/surface.json
if (git diff --cached --quiet) {
Write-Host "No changes to commit."
} else {
$date = Get-Date -Format 'yyyy-MM-dd'
git commit -m "chore(catalog): update Microsoft Surface driver pack catalog ($date)"
git push
}