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