Update Trackers List #6
This file contains 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 Trackers List' | |
on: | |
schedule: | |
# Runs every Wednesday at 1:00 PM (13:00) UTC | |
- cron: '0 13 * * 3' | |
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 }} |