Skip to content

BLD-Agro

BLD-Agro #1151

Workflow file for this run

# Based on https://github.com/dmachard/blocklist-domains
name: BLD-Agro
on:
schedule:
# At the end of every day
# - cron: "0 0 * * *"
# Con every 12 hours
- cron: "0 */12 * * *"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
# checkout all branches
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo python3 -m pip install blocklist_aggregator pybadges python-dotenv
- name: Generate blocklists and badges
run: |
sudo python3 bld-agro.py
sudo python3 badges.py
sudo cp -rf *.txt /tmp
sudo cp -rf *.svg /tmp
sudo cp -rf *.cdb /tmp
- name: Remove remote data branch
if: ${{ success() }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git push origin :data
- name: Checkout
if: ${{ success() }}
run: |
git checkout --orphan data
git rm -rf .
cp -rf /tmp/*.txt .
cp -rf /tmp/*.svg .
cp -rf /tmp/*.cdb .
- name: Add files
if: ${{ success() }}
run: |
git add .
- name: Commit Push
if: ${{ success() }}
run: |
git commit -m "blocklist generated"
git push origin data