Skip to content

Weekly Update Hosts

Weekly Update Hosts #3

Workflow file for this run

name: Weekly Update Hosts
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
permissions:
contents: write
jobs:
update_hosts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Remove existing hosts (optional)
run: rm -f hosts || true
- name: Download script
run: curl -sSfL ${{ secrets.SCRIPT }} -o script.py
- name: Run Python script
run: python3 script.py
- name: Commit changes
run: |
git config --local user.name "elliottophellia"
git config --local user.email "[email protected]"
git add hosts -f
git commit -m "πŸš€ Update: $(date +'%Y-%m-%d %H:%M:%S %Z')"
git push -f