Skip to content

Commit 1b585ea

Browse files
committed
reset
1 parent 9d3d472 commit 1b585ea

File tree

1 file changed

+48
-47
lines changed

1 file changed

+48
-47
lines changed
Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,53 @@
11
name: Generate
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
kubernetesBranch:
7-
type: string
8-
required: true
9-
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: 'b461333bb57fa2dc2152f939ed70bac3cef2c1f6'
14-
description: 'The commit to use for the kubernetes-client/gen repo'
4+
workflow_dispatch:
5+
inputs:
6+
kubernetesBranch:
7+
type: string
8+
required: true
9+
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: 'b461333bb57fa2dc2152f939ed70bac3cef2c1f6'
14+
description: 'The commit to use for the kubernetes-client/gen repo'
15+
1516

1617
jobs:
17-
generate:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Checkout Javascript
21-
uses: actions/[email protected]
22-
- name: Setup Node
23-
uses: actions/setup-node@v5
24-
with:
25-
node-version: '20'
26-
- name: Generate Openapi
27-
run: |
28-
echo "export KUBERNETES_BRANCH=${{ github.event.inputs.kubernetesBranch }} >> ./settings"
29-
echo "export GEN_COMMIT="${{ github.event.inputs.genCommit }}" >> ./settings"
30-
./generate-client.sh
31-
- name: Generate Branch Name
32-
run: |
33-
SUFFIX=$(openssl rand -hex 4)
34-
echo "BRANCH=automated-generate-$SUFFIX" >> $GITHUB_ENV
35-
- name: Commit and push
36-
run: |
37-
# Commit and push
38-
git config user.email "[email protected]"
39-
git config user.name "Kubernetes Prow Robot"
40-
git checkout -b "$BRANCH"
41-
git add .
42-
# we modify the settings file in "Generate Openapi" but do not want to commit this
43-
git reset settings
44-
git commit -s -m 'Automated openapi generation from ${{ github.event.inputs.kubernetesBranch }}'
45-
git push origin "$BRANCH"
46-
- name: Pull Request
47-
uses: repo-sync/pull-request@v2
48-
with:
49-
source_branch: ${{ env.BRANCH }}
50-
destination_branch: ${{ github.ref_name }}
51-
github_token: ${{ secrets.GITHUB_TOKEN }}
52-
pr_title: 'Automated Generate from openapi ${{ github.event.inputs.kubernetesBranch }}'
18+
generate:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Javascript
22+
uses: actions/[email protected]
23+
- name: Setup Node
24+
uses: actions/setup-node@v5
25+
with:
26+
node-version: '20'
27+
- name: Generate Openapi
28+
run: |
29+
echo "export KUBERNETES_BRANCH=${{ github.event.inputs.kubernetesBranch }} >> ./settings"
30+
echo "export GEN_COMMIT="${{ github.event.inputs.genCommit }}" >> ./settings"
31+
./generate-client.sh
32+
- name: Generate Branch Name
33+
run: |
34+
SUFFIX=$(openssl rand -hex 4)
35+
echo "BRANCH=automated-generate-$SUFFIX" >> $GITHUB_ENV
36+
- name: Commit and push
37+
run: |
38+
# Commit and push
39+
git config user.email "[email protected]"
40+
git config user.name "Kubernetes Prow Robot"
41+
git checkout -b "$BRANCH"
42+
git add .
43+
# we modify the settings file in "Generate Openapi" but do not want to commit this
44+
git reset settings
45+
git commit -s -m 'Automated openapi generation from ${{ github.event.inputs.kubernetesBranch }}'
46+
git push origin "$BRANCH"
47+
- name: Pull Request
48+
uses: repo-sync/pull-request@v2
49+
with:
50+
source_branch: ${{ env.BRANCH }}
51+
destination_branch: ${{ github.ref_name }}
52+
github_token: ${{ secrets.GITHUB_TOKEN }}
53+
pr_title: "Automated Generate from openapi ${{ github.event.inputs.kubernetesBranch }}"

0 commit comments

Comments
 (0)