Format data #187
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: Format data | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 7 * * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Deno | |
| uses: denoland/[email protected] | |
| - name: Sync | |
| run: deno run -A main.ts | |
| - name: Push | |
| run: | | |
| git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} | |
| git config --global user.name "GitHub Actions" | |
| git config --global user.email "[email protected]" | |
| if (git diff --shortstat | grep '[0-9]'); then \ | |
| git add .; \ | |
| git commit -m "Auto sync"; \ | |
| git push origin HEAD:${GITHUB_REF}; \ | |
| fi |