Skip to content

Commit 0de6bed

Browse files
committed
add workflow dispatch to offliner-definition ci
1 parent c30955c commit 0de6bed

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.github/workflows/update-zim-offliner-definition.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@ on:
88
release:
99
types: [published]
1010

11+
workflow_dispatch:
12+
inputs:
13+
version:
14+
description: "Version to publish"
15+
required: false
16+
default: "dev"
17+
1118
jobs:
1219
prepare-json:
1320
runs-on: ubuntu-24.04
1421
outputs:
15-
offliner_definition: ${{ steps.read-json.outputs.offliner_definition }}
22+
offliner_definition_b64: ${{ steps.read-json.outputs.offliner_definition_b64 }}
1623
steps:
1724
- name: Checkout repository
1825
uses: actions/checkout@v4
@@ -25,14 +32,14 @@ jobs:
2532
echo "File not found!" >&2
2633
exit 1
2734
fi
28-
json=$(jq -c . offliner-definition.json)
29-
echo "offliner_definition=$json" >> $GITHUB_OUTPUT
35+
json_b64=$(base64 -w0 <<< "$(jq -c . offliner-definition.json)")
36+
echo "offliner_definition_b64=$json_b64" >> $GITHUB_OUTPUT
3037
call-workflow:
3138
needs: prepare-json
3239
uses: openzim/overview/.github/workflows/update-zimfarm-offliner-definition.yaml@main
3340
with:
34-
version: ${{ github.event_name == 'release' && github.event.release.tag_name || 'dev' }}
41+
version: ${{ github.event_name == 'release' && github.event.release.tag_name || (github.event.inputs.version || 'dev') }}
3542
offliner: openedx
36-
offliner_definition: ${{ needs.prepare-json.outputs.offliner_definition }}
43+
offliner_definition_b64: ${{ needs.prepare-json.outputs.offliner_definition_b64 }}
3744
secrets:
3845
zimfarm_ci_secret: ${{ secrets.ZIMFARM_CI_SECRET }}

0 commit comments

Comments
 (0)