Skip to content

Commit fe3c8b4

Browse files
committed
use reusable workflow
1 parent 6710388 commit fe3c8b4

File tree

2 files changed

+38
-83
lines changed

2 files changed

+38
-83
lines changed

.github/workflows/ZimFarmUpdate.yaml

Lines changed: 0 additions & 83 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Update ZIMFarm Definitions
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "offliner-definition.json"
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
prepare-json:
13+
runs-on: ubuntu-24.04
14+
outputs:
15+
offliner_definition: ${{ steps.read-json.outputs.offliner_definition }}
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- id: read-json
23+
run: |
24+
if [ ! -f "offliner-definition.json" ]; then
25+
echo "File not found!" >&2
26+
exit 1
27+
fi
28+
json=$(jq -c . offliner-definition.json)
29+
echo "offliner_definition=$json" >> $GITHUB_OUTPUT
30+
call-workflow:
31+
needs: prepare-json
32+
uses: openzim/overview/.github/workflows/update-zimfarm-offliner-definition.yaml
33+
with:
34+
version: ${{ github.event_name == 'release' && github.event.release.tag_name || 'dev' }}
35+
offliner: devdocs
36+
offliner_definition: ${{ needs.prepare-json.outputs.offliner_definition }}
37+
secrets:
38+
zimfarm_ci_secret: ${{ secrets.ZIMFARM_CI_SECRET }}

0 commit comments

Comments
 (0)