Build #1096
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: Build | |
on: | |
schedule: | |
# Every 5 minutes | |
#- cron: "*/5 * * * *" | |
# At the end of every day | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# checkout all branches | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
sudo python3 -m pip install blocklist_aggregator pybadges | |
- name: Generate blocklists and badges | |
run: | | |
sudo python3 blocklist.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 |