-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add monthly workflow for reporting of zimit tasks
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.ZIMIT_DRIVE_WEBDAV_CREDENTIALS }}" -T "farm.zimit.kiwix.org_tasks_*.csv" -sw '%{http_code}' "https://drive.zimit.kiwix.org/reports/" |