Skip to content

Commit 81a707c

Browse files
authored
Add python version inputs
1 parent 9da98c2 commit 81a707c

File tree

9 files changed

+80
-47
lines changed

9 files changed

+80
-47
lines changed

.github/workflows/build-node-python.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@ on:
9292
type: number
9393
required: false
9494
default: 60
95-
95+
python_version:
96+
type: string
97+
required: false
98+
node_version:
99+
type: string
100+
required: false
101+
96102
secrets:
97103
DATAVISYN_BOT_REPO_TOKEN:
98104
required: false
@@ -109,7 +115,7 @@ on:
109115

110116
env:
111117
NPM_REGISTRY: "https://registry.npmjs.org/"
112-
NODE_VERSION: "20.9"
118+
NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }}
113119
PYPI_REGISTRY: "https://upload.pypi.org/legacy/"
114120
PYPI_USERNAME: "datavisyn"
115121
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || "3.10" }}
@@ -155,9 +161,9 @@ jobs:
155161
# We probably won't need Rust on Node builds...
156162
# enable_rust: ${{ inputs.rust_enable }}
157163
run_parallel: ${{ inputs.run_parallel }}
158-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
164+
node_version: ${{ inputs.node_version || inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
159165
npm_registry: ${{ env.NPM_REGISTRY }}
160-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
166+
python_version: ${{ inputs.python_version || inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
161167
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
162168
run_node_bundle: ${{ inputs.node_run_webpack }}
163169
enable_node_cache: ${{ inputs.runs_on != 'self-hosted' }}
@@ -195,9 +201,9 @@ jobs:
195201
enable_python: true
196202
enable_rust: ${{ inputs.rust_enable }}
197203
run_parallel: ${{ inputs.run_parallel }}
198-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
204+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
199205
npm_registry: ${{ env.NPM_REGISTRY }}
200-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
206+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
201207
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
202208
run_node_bundle: ${{ inputs.node_run_webpack }}
203209
enable_node_cache: ${{ inputs.runs_on != 'self-hosted' }}
@@ -286,9 +292,9 @@ jobs:
286292
with:
287293
enable_rust: ${{ inputs.rust_enable }}
288294
run_parallel: ${{ inputs.run_parallel }}
289-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
295+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
290296
npm_registry: ${{ env.NPM_REGISTRY }}
291-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
297+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
292298
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
293299
run_node_bundle: false # Disable the build here and call afterwards, as otherwise the yarn run env:decrypt will fail due to a missing yarn install
294300
enable_node_cache: ${{ inputs.cypress_runs_on != 'self-hosted' && inputs.runs_on != 'self-hosted' }}
@@ -429,9 +435,9 @@ jobs:
429435
with:
430436
enable_rust: ${{ inputs.rust_enable }}
431437
run_parallel: ${{ inputs.run_parallel }}
432-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
438+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
433439
npm_registry: ${{ env.NPM_REGISTRY }}
434-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
440+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
435441
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
436442
run_node_bundle: false # Disable the build here and call afterwards, as otherwise the yarn run env:decrypt will fail due to a missing yarn install
437443
run_playwright_browser_install: true

.github/workflows/build-node.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ on:
2121
type: string
2222
required: false
2323
default: "ubuntu-22.04"
24+
node_version:
25+
type: string
26+
required: false
27+
2428
secrets:
2529
DATAVISYN_BOT_REPO_TOKEN:
2630
required: false
@@ -31,7 +35,7 @@ on:
3135

3236
env:
3337
NPM_REGISTRY: "https://registry.npmjs.org/"
34-
NODE_VERSION: "20.9"
38+
NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }}
3539
WORKFLOW_BRANCH: "main"
3640

3741
permissions:
@@ -69,7 +73,7 @@ jobs:
6973
with:
7074
enable_node: true
7175
enable_python: false
72-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
76+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
7377
npm_registry: ${{ env.NPM_REGISTRY }}
7478
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
7579
run_node_bundle: ${{ inputs.node_run_webpack }}

.github/workflows/build-product.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ concurrency:
3030

3131
env:
3232
TIME_ZONE: "Europe/Vienna"
33-
NODE_VERSION: "20.9"
33+
NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }}
3434
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || "3.10" }}
3535
WORKFLOW_BRANCH: "main"
3636
PYTHON_BASE_IMAGE: "python:3.10.18-slim-bullseye"

.github/workflows/build-python.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
type: string
1212
required: false
1313
default: "ubuntu-22.04"
14+
python_version:
15+
type: string
16+
required: false
17+
1418
secrets:
1519
DATAVISYN_BOT_REPO_TOKEN:
1620
required: false
@@ -58,5 +62,5 @@ jobs:
5862
enable_node: false
5963
enable_python: true
6064
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
61-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
65+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
6266
enable_python_cache: ${{ inputs.runs_on != 'self-hosted' }}

.github/workflows/build-single-product-part.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ on:
5252
default: "ubuntu-22.04"
5353
env:
5454
TIME_ZONE: "Europe/Vienna"
55-
NODE_VERSION: "20.9"
55+
NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }}
5656
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || "3.10" }}
5757
WORKFLOW_BRANCH: "main"
5858
PYTHON_BASE_IMAGE: "python:3.10.18-slim-bullseye"

.github/workflows/build-workspace-product-part.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,36 @@ on:
1818
GITLAB_HOST:
1919
required: false
2020
inputs:
21-
component:
22-
description: "component that should be built"
23-
required: true
24-
type: string
25-
image_tag1:
26-
description: "image tag 1 to push the image"
27-
required: true
28-
type: string
29-
image_tag2:
30-
description: "image tag 2 for labeling"
31-
required: true
32-
type: string
33-
build_time:
34-
description: "actually build time (in RFC 3339)"
35-
required: true
36-
type: string
37-
stage:
38-
description: "stage for the image (develop or production) depending on the branch name"
39-
required: true
40-
type: string
41-
timeout:
42-
description: "Timeout for each job in minutes."
43-
type: number
44-
required: false
45-
default: 60
21+
component:
22+
description: "component that should be built"
23+
required: true
24+
type: string
25+
image_tag1:
26+
description: "image tag 1 to push the image"
27+
required: true
28+
type: string
29+
image_tag2:
30+
description: "image tag 2 for labeling"
31+
required: true
32+
type: string
33+
build_time:
34+
description: "actually build time (in RFC 3339)"
35+
required: true
36+
type: string
37+
stage:
38+
description: "stage for the image (develop or production) depending on the branch name"
39+
required: true
40+
type: string
41+
timeout:
42+
description: "Timeout for each job in minutes."
43+
type: number
44+
required: false
45+
default: 60
46+
4647
env:
4748
VISYN_SCRIPTS_VERSION: "v7" # visyn_scripts@v7 is the last version with workspace support
4849
TIME_ZONE: "Europe/Vienna"
49-
NODE_VERSION: "20.9"
50+
NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }}
5051
PYTHON_VERSION: ${{ vars.PYTHON_VERSION || "3.10" }}
5152
WORKFLOW_BRANCH: "main"
5253
PYTHON_BASE_IMAGE: "python:3.10.18-slim-bullseye"

.github/workflows/publish-node-python.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ name: publish-node-python
22

33
on:
44
workflow_call:
5+
inputs:
6+
python_version:
7+
type: string
8+
required: false
9+
node_version:
10+
type: string
11+
required: false
12+
513
secrets:
614
PYPI_USERNAME:
715
required: true
@@ -17,7 +25,7 @@ on:
1725
required: false
1826

1927
env:
20-
NODE_VERSION: "20.9"
28+
NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }}
2129
NPM_REGISTRY: "https://registry.npmjs.org/"
2230
PYPI_REGISTRY: "https://upload.pypi.org/legacy/"
2331
PYPI_USERNAME: "datavisyn"
@@ -63,7 +71,7 @@ jobs:
6371
with:
6472
enable_node: true
6573
enable_python: false
66-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
74+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
6775
npm_registry: ${{ env.NPM_REGISTRY }}
6876
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
6977
- uses: ./tmp/github-workflows/.github/actions/publish-node
@@ -96,7 +104,7 @@ jobs:
96104
with:
97105
enable_node: false
98106
enable_python: true
99-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
107+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
100108
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
101109
- uses: ./tmp/github-workflows/.github/actions/publish-python
102110
with:

.github/workflows/publish-node.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: publish-node
22

33
on:
44
workflow_call:
5+
inputs:
6+
node_version:
7+
type: string
8+
required: false
9+
510
secrets:
611
NPM_TOKEN:
712
required: true
@@ -12,7 +17,7 @@ on:
1217

1318
env:
1419
NPM_REGISTRY: "https://registry.npmjs.org/"
15-
NODE_VERSION: "20.9"
20+
NODE_VERSION: ${{ vars.NODE_VERSION || "3.10" }}
1621
WORKFLOW_BRANCH: "main"
1722

1823
permissions:
@@ -54,7 +59,7 @@ jobs:
5459
with:
5560
enable_node: true
5661
enable_python: false
57-
node_version: ${{ secrets.NODE_VERSION || env.NODE_VERSION }}
62+
node_version: ${{ inputs.node_version || secrets.NODE_VERSION || env.NODE_VERSION }}
5863
npm_registry: ${{ env.NPM_REGISTRY }}
5964
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
6065
- uses: ./tmp/github-workflows/.github/actions/publish-node

.github/workflows/publish-python.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: publish-python
22

33
on:
44
workflow_call:
5+
inputs:
6+
python_version:
7+
type: string
8+
required: false
9+
510
secrets:
611
PYPI_USERNAME:
712
required: true
@@ -51,7 +56,7 @@ jobs:
5156
with:
5257
enable_node: false
5358
enable_python: true
54-
python_version: ${{ secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
59+
python_version: ${{ inputs.python_version || secrets.PYTHON_VERSION || env.PYTHON_VERSION }}
5560
github_ro_token: ${{ github.event.repository.private == true && secrets.DATAVISYN_BOT_REPO_TOKEN || github.token }}
5661
- uses: ./tmp/github-workflows/.github/actions/publish-python
5762
with:

0 commit comments

Comments
 (0)