-
Notifications
You must be signed in to change notification settings - Fork 0
set up ci to update offliner definition #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
=======================================
Coverage 92.28% 92.28%
=======================================
Files 4 4
Lines 376 376
Branches 37 37
=======================================
Hits 347 347
Misses 25 25
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like we should:
- replace "farm" with "zimfarm" for clarity (in job, filename, variables, comments, ...)
- rename file from
devdocs.jsontooffliner-definition.json(so that we have same name in all scrapers, and it is way easier for scraper maintainers to understand what this file is about)
Sorry for these nitty-gritty details, but it is worth to polish this first PR before spreading this over all scrapers ^^
Thank you overall, once both details above are fixed we should merge and try to make it run on main, we might realize there is something still needing polishing, but we shouldn't care.
|
Okay. I was thinking if there's a way we could reuse the workflow given all the scrapers are all on the same org repo. |
Is there a way in Github to run "org" CIs ?
I didn't dare to mention it because I was afraid I just missed it during my review 🤣 Or maybe we could say that POST allows to both create or update definition (a bit more risky, but not that a big deal) |
I am currently looking at https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows#creating-a-reusable-workflow but it doesn't seem to cover what I need. Not sure if it respects the |
# .github/workflows/reusable-offliner.yml
name: Offliner Reusable Workflow
on:
workflow_call:
inputs:
version:
required: string
type: string
offliner:
required: true
type: string
jobs:
offliner:
runs-on: ubuntu-latest
steps:
- run: echo "Running offliner with version=${{ inputs.version || 'auto' }}"and then in devdocs # .github/workflows/offliner-triggers.yml
name: Offliner Triggers
on:
push:
branches: [main]
paths:
- "offliner-definition.json"
release:
types: [published]
jobs:
call-reusable:
uses: ./.github/workflows/reusable-offliner.yml
with:
version: ${{ github.event.release.tag_name || 'dev' }}
offliner: devdocs |
|
I reckon it could take more arguments |
|
I think openzim/overview would be a good place to place the reusable workflow. What do you think? |
Yes, we should give it a try |
|
set up openzim/overview#64 for the reusable workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I will try to run this once you've merged
fe3c8b4 to
5857667
Compare
Changes