Skip to content

Update Trackers List #5

Update Trackers List

Update Trackers List #5

name: 'Update Trackers List'
on:
schedule:
# Runs at the end of every week at 1:00 PM (13:00) UTC
- cron: '0 13 * * 0'
workflow_dispatch: # Allows manual triggering of the workflow
jobs:
update-trackers-list:
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
steps:
- name: 'Checkout Repository'
uses: 'actions/checkout@v4'
with:
repository: ${{ github.repository }}
token: ${{ secrets.TOKEN }}
- name: 'Fetching Lists of BT Trackers'
shell: bash
run: |
cp -v ./scripts/fetching-tracker-lists .
chmod a+rxw ./fetching-tracker-lists
exec ./fetching-tracker-lists
- name: 'Removing Duplicate URIs'
shell: bash
run: |
cp -v ./scripts/remove-duplicates .
chmod a+rxw ./remove-duplicates
exec ./remove-duplicates
- name: 'Commit changes'
shell: bash
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add ./ultimate_trackers.txt
current_time=$(date +'%Y-%m-%d %H:%M:%S')
git commit -m "Updated \`ultimate_trackers.txt\` at $current_time"
- name: 'Push changes'
uses: 'ad-m/[email protected]'
with:
github_token: ${{ secrets.TOKEN }}
branch: ${{ github.ref }}