Sync Upstream #38
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 Upstream | |
| 'on': | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: sync-upstream | |
| cancel-in-progress: false | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| persist-credentials: true | |
| - name: Configure git | |
| run: | | |
| git remote add upstream https://github.com/badlogic/pi-mono.git 2>/dev/null || \ | |
| git remote set-url upstream https://github.com/badlogic/pi-mono.git | |
| git config user.name "senpi-sync-bot" | |
| git config user.email "actions@github.com" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 | |
| with: | |
| node-version: '24' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1 | |
| with: | |
| bun-version: 1.2.20 | |
| - name: Install dependencies | |
| run: npm install --no-audit --no-fund | |
| - name: Run upstream sync | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: node scripts/sync-upstream.mjs |