Generate Blocklist Hosts #420
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: Generate Blocklist Hosts | |
#on: push | |
on: | |
schedule: | |
- cron: '0 */3 * * *' | |
jobs: | |
generate_hosts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup nodejs | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
# - name: Install npm dependencies | |
# run: npm install axios | |
- name: Update workflow | |
run: git pull origin main | |
- name: Run generator | |
run: node index.js | |
- name: Upload Files | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
run: | | |
git config --local user.email ${{ secrets.EMAIL }} | |
git config --local user.name "Security Guy" | |
git add hosts | |
git commit -m "Update hosts" | |
git push https://${{ secrets.TOKEN }}@github.com/croxtyl/pihole-blocklist.git main | |
# git push |