Skip to content

Commit 0b2ca71

Browse files
committed
Fix github action.
1 parent d92c69c commit 0b2ca71

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/generate-javascript.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
type: string
88
required: true
99
description: 'The remote kubernetes release branch to fetch openapi spec. .e.g. "release-1.23"'
10+
genCommit:
11+
type: string
12+
required: true
13+
default: '82c3ff5'
14+
description: 'The commit to use for the kubernetes-client/gen repo'
1015

1116

1217
jobs:
@@ -15,12 +20,15 @@ jobs:
1520
steps:
1621
- name: Checkout Javascript
1722
uses: actions/checkout@v3
18-
- name: Setup Java
23+
- name: Setup Node
1924
uses: actions/setup-node@v2
2025
with:
2126
node-version: '16'
2227
- name: Checkout Gen
23-
run: git clone https://github.com/kubernetes-client/gen
28+
run: |
29+
git clone https://github.com/kubernetes-client/gen
30+
pushd gen
31+
git checkout "${{ github.event.inputs.genCommit }}"
2432
- name: Generate Branch Name
2533
run: |
2634
SUFFIX=$(openssl rand -hex 4)
@@ -30,7 +38,7 @@ jobs:
3038
pushd gen/openapi
3139
cat <<"EOF"> settings
3240
# kubernetes-client/gen commit to use for code generation.
33-
export GEN_COMMIT=82c3ff5
41+
export GEN_COMMIT="${{ github.event.inputs.genCommit }}"
3442
# GitHub username/organization to clone kubernetes repo from.
3543
export USERNAME=kubernetes
3644
# Kubernetes branch/tag to get the OpenAPI spec from.
@@ -42,7 +50,7 @@ jobs:
4250
export PACKAGE_NAME="@kubernetes/node-client"
4351
export OPENAPI_GENERATOR_COMMIT=1314e229
4452
EOF
45-
bash typescript.sh ../../src/gen settings
53+
bash typescript.sh ../../src/gen/api settings
4654
popd
4755
cp settings ../../settings
4856
rm -rf gen

0 commit comments

Comments
 (0)