1+ name : ' Run KNIME Workflow Test'
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ run_build :
7+ description : ' Run build job'
8+ required : false
9+ default : ' true'
10+
11+ jobs :
12+ build :
13+ name : Bundle extension and build image
14+ runs-on : ubuntu-latest
15+ if : ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.run_build == 'true' }}
16+ env :
17+ LOCAL_UPDATE_SITE_DIR : local-update-site
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v4
21+
22+ - name : Setup Pixi
23+ uses : prefix-dev/setup-pixi@v0.8.2
24+
25+ - name : Install environment
26+ run : pixi install
27+
28+ - name : Build local update site
29+ run : pixi run build
30+
31+ - name : Upload update site artifact
32+ uses : actions/upload-artifact@v4
33+ with :
34+ name : extensionartifacts-for-update-site-${{ github.run_id }}
35+ path : ${{ env.LOCAL_UPDATE_SITE_DIR }}
36+
37+ - name : Compute KNIME feature group from knime.yml
38+ id : knime_meta
39+ shell : bash
40+ run : |
41+ pixi exec -- python - <<'PY'
42+ import os
43+ import yaml
44+ with open('knime.yml', 'r', encoding='utf-8') as f:
45+ y = yaml.safe_load(f)
46+ group_id = (y.get('group_id') or '').strip()
47+ name = (y.get('name') or '').strip()
48+ if not group_id or not name:
49+ raise SystemExit(f"Failed to parse group_id/name from knime.yml (group_id={group_id}, name={name})")
50+ feature_group_id = f"{group_id}.features.{name}.feature.group"
51+ with open(os.environ['GITHUB_OUTPUT'], 'a', encoding='utf-8') as gh:
52+ print(f"feature_group_id={feature_group_id}", file=gh)
53+ print("Computed feature group:", feature_group_id)
54+ PY
55+
56+ - name : Build KNIME image with local update site
57+ run : |
58+ docker build \
59+ -f .github/workflows/Dockerfile \
60+ --build-arg LOCAL_UPDATE_SITE_SRC="${{ env.LOCAL_UPDATE_SITE_DIR }}" \
61+ --build-arg KNIME_FEATURES_ARG="${{ steps.knime_meta.outputs.feature_group_id }}" \
62+ -t knime-executor-with-extension:ci .
0 commit comments