Sync Sponsors Data #79
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: 'Sync Sponsors Data' | |
| on: | |
| schedule: | |
| # daily | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| sync-sponsors-data: | |
| name: Sync Sponsors Data | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| - run: pnpm i | |
| - name: sync-sponsors | |
| run: pnpm sync:sponsors | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - run: pnpm prettier src/data -w | |
| # tauri-docs PR | |
| - name: Git config | |
| run: | | |
| git config --global user.name "tauri-bot" | |
| git config --global user.email "[email protected]" | |
| - name: Create pull request for updated docs | |
| id: cpr | |
| # soft fork of https://github.com/peter-evans/create-pull-request for security purposes | |
| uses: tauri-apps/[email protected] | |
| if: github.event_name != 'pull_request' && github.event_name != 'push' | |
| with: | |
| token: ${{ secrets.ORG_TAURI_BOT_PAT }} | |
| commit-message: 'chore(docs): Update Sponsors Data' | |
| branch: ci/v2/update-sponsors | |
| title: Update Sponsors Data | |
| labels: 'bot' | |
| - name: Automerge | |
| run: gh pr merge --squash --auto ${{ steps.cpr.outputs.pull-request-number }} | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |