Update trackers2.json from Jackett #10
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 trackers2.json from Jackett | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update-jackett: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v1 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --no-progress | |
| - name: Update trackers2.json from Jackett | |
| run: bun run update:jackett | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check for changes | |
| id: diff | |
| run: | | |
| if git diff --quiet -- trackers2.json; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Commit and push changes | |
| if: ${{ steps.diff.outputs.changed == 'true' }} | |
| run: | | |
| git config user.name 'github-actions[bot]' | |
| git config user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add trackers2.json | |
| git commit -m 'update: Jackett trackers2.json' | |
| git push | |