-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.18 KB
/
generate-code.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Generate code from OpenAPI spec in artifact 'openapi'
on:
workflow_call:
inputs:
cmk_version:
required: true
type: string
source_artifact:
required: true
type: string
target_artifact:
required: true
type: string
snapshot:
required: false
type: boolean
default: true
jobs:
generate-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download OpenAPI spec from above job
uses: actions/download-artifact@v3
with:
name: ${{ inputs.source_artifact }}
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Create code based on OpenAPI spec
run: ./generate.sh
env:
OPENAPI_VERSION: ${{ inputs.cmk_version }}
SNAPSHOT: ${{ inputs.snapshot }}
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.target_artifact }}
path: |
.
!.git
!.github
!.gitignore