From 0388df6bb3e4965a1acdbd9009c8c84abd4b7ed4 Mon Sep 17 00:00:00 2001 From: benoit74 Date: Thu, 19 Sep 2024 09:14:59 +0000 Subject: [PATCH] Add monthly workflow for reporting of zimit tasks --- .github/workflows/monthly_reporting.yaml | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/monthly_reporting.yaml diff --git a/.github/workflows/monthly_reporting.yaml b/.github/workflows/monthly_reporting.yaml new file mode 100644 index 0000000..c8539b0 --- /dev/null +++ b/.github/workflows/monthly_reporting.yaml @@ -0,0 +1,27 @@ +name: Monthly reporting + +on: + schedule: + - cron: "0 8 1 * *" + workflow_dispatch: + push: + branches: + - zimit_report + +jobs: + + zimit-tasks: + runs-on: ubuntu-24.04 + steps: + - uses: actions/setup-python@v4 + with: + python-version: 3.12 + architecture: x64 + - name: Install dependencies + run: pip install requests==2.32.3 python-dateutil==2.9.0.post0 + - name: Download script + run: curl -O https://raw.githubusercontent.com/openzim/zimfarm/refs/heads/main/dispatcher/backend/maint-scripts/monthly_report_tasks.py + - name: Create report + run: ZF_URI="https://api.farm.zimit.kiwix.org/v1" FILE_PREFIX="farm.zimit.kiwix.org_tasks_" python monthly_report_tasks.py -- + - name: Upload report + run: curl -u "${{ secrets.DRIVE_CREDENTIALS }}" -T "*.csv" -sw '%{http_code}' "https://drive.zimit.kiwix.org/reports/" \ No newline at end of file