Auto Update #145
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: Auto Update | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "master" | |
| schedule: | |
| - cron: "0 */4 * * *" | |
| permissions: | |
| contents: write | |
| jobs: | |
| auto-update: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Self | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 2 | |
| - name: Aggregate and update | |
| shell: pwsh | |
| run: | | |
| .\bin\auto-update.ps1 | |
| # Configure git | |
| git config user.email "[email protected]" | |
| git config user.name "github-actions[bot]" | |
| git add --all | |
| # Commit and push if there are changes | |
| if ([string]::IsNullOrEmpty((git status --porcelain))) { | |
| echo "No changes to commit" | |
| } else { | |
| git commit -m "Updated on $(Get-Date -Format "yyyy-MM-dd HH:mm K")" | |
| git push -f origin master | |
| } |