From 7112831f39ee0f2c9bef05f145b609508dc752b0 Mon Sep 17 00:00:00 2001 From: Andrevich <47223721+1andrevich@users.noreply.github.com> Date: Sat, 7 Dec 2024 19:41:19 +0400 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 59 +++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..29642c4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,59 @@ +name: Build domains_all and ipsum + +on: + push: + branches: + - main + schedule: + - cron: '0 0 */3 * *' # Runs every 3rd day at midnight UTC + +jobs: + run-python-scripts: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' # Use the appropriate Python version + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install requests idna + + - name: Prepare directories for build + run: | + if [ ! -d "sum/input" ]; then mkdir -p sum/input; fi + if [ ! -d "sum/output" ]; then mkdir -p sum/output; fi + + - name: Run OONI Parser (ooni_domains.lst) + run: python src/step 5 ooni list/ooni_list.py + +##Community.lst and Domains.lst are already in the sum/input folder + + - name: Run Domain Sum Up script (domains_all.lst) + run: python src/step 5 ooni list/domain_sum.py + + - name: Run OONI Resolver script (ooni_ips.lst) + run: python src/step 5 ooni list/resolver_ooni.py + + - name: Run Community Resolver script (ip_community.lst) + run: python src/step 5 ooni list/resolver_community.py + + - name: Run IP Sum (Temp) script (ips_all.lst) + run: python src/step 5 ooni list/ip_4files_sum.py + + - name: Run IP Sum + ASN (Final) script (ipsum.lst) + run: python src/step 5 ooni list/ipsum_bgp.py + + - name: Run Bird2 Converter script + run: python src/step 5 ooni list/bird2_converter.py + + - name: Convert files to LF (Unix format) + run: | + sudo apt-get update && sudo apt-get install -y dos2unix + find . -type f -name "*.lst" -exec dos2unix {} +