Skip to content

Commit bf48bb3

Browse files
committed
define inputs as bash variables
1 parent 55a5d03 commit bf48bb3

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/build_artifacts.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,31 @@ jobs:
7575
- id: set-matrix
7676
run: |
7777
artifacts=()
78+
# Define inputs as bash variables to be able to parse them in
79+
# if conditions
7880
is_workflow_call=${{ inputs.is_workflow_call }}
81+
build_jax=${{ inputs.build_jax }}
82+
build_jaxlib=${{ inputs.build_jaxlib }}
83+
build_jax_cuda_pjrt=${{ inputs.build_jax_cuda_pjrt }}
84+
build_jax_cuda_plugin=${{ inputs.build_jax_cuda_plugin }}
85+
7986
# Build every package if not a workflow call
80-
if [[ ${is_workflow_call:-0} == "0" ]]; then
87+
if [[ ${is_workflow_call:-"0"} == "0" ]]; then
8188
artifacts=("'jax'" ", 'jaxlib'" ", 'jax-cuda-pjrt'" ", 'jax-cuda-plugin'")
8289
else
83-
if [[ ${${{ inputs.build_jax }}:-0} == "1" ]]; then
90+
if [[ ${build_jax:-"0"} == "1" ]]; then
8491
artifacts+="'jax',"
8592
fi
8693
87-
if [[ ${${{ inputs.build_jaxlib }}:-0} == "1" ]]; then
94+
if [[ ${build_jaxlib:-"0"} == "1" ]]; then
8895
artifacts+="'jaxlib',"
8996
fi
9097
91-
if [[ ${${{ inputs.build_jax_cuda_pjrt }}:-0} == "1" ]]; then
98+
if [[ ${build_jax_cuda_pjrt:-"0"} == "1" ]]; then
9299
artifacts+="'jax-cuda-pjrt',"
93100
fi
94101
95-
if [[ ${${{ inputs.build_jax_cuda_plugin }}:-0} == "1" ]]; then
102+
if [[ ${build_jax_cuda_plugin:-"0"} == "1" ]]; then
96103
artifacts+="'jax-cuda-plugin'"
97104
fi
98105
fi

0 commit comments

Comments
 (0)