Update Subscriptions #4
Workflow file for this run
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: Update Subscriptions | |
| on: | |
| schedule: | |
| - cron: '17 * * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Fetch and merge sources | |
| run: npx tsx src/fetch.ts | |
| - name: TCP connectivity check | |
| run: npx tsx src/check.ts | |
| - name: Generate output | |
| run: npx tsx src/output.ts | |
| - name: Deploy to sub branch | |
| run: | | |
| cd output | |
| git init | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "$(date -u '+%Y-%m-%d %H:%M') update" | |
| git push --force "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" HEAD:sub |