-
Notifications
You must be signed in to change notification settings - Fork 3
89 lines (84 loc) · 2.8 KB
/
selfserve-full-workflow.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Generate and Publish SDK Sources (Without Release)
on:
workflow_call:
inputs:
name:
description: 'SDK Name'
required: true
type: string
version:
description: |
SDK Version.
E.g., 1.0.0, 1.0.1, 1.0.0-SNAPSHOT, etc.
required: true
type: string
sdk_repo_ref:
description: |
Branch or tag to checkout on the `expediagroup-sdk-core` repository.
Leave empty to use the default branch.
type: string
default: ''
repository:
description: |
Repository to generate the SDK in.
Leave empty to use the current repository.
type: string
default: ''
ref:
description: |
Branch or tag to checkout on the provided repository.
Leave empty to use the default branch.
type: string
default: ''
transformations:
description: 'Spec Transformer CLI Configurations'
type: string
default: '--headers --operationIdsToTags'
sources_path:
description: 'Path to publish the source code to. This should be a path of a directory where the source code will be published to'
type: string
default: 'code'
sdk_key:
description: |
Key to the generated SDK artifact.
This artifact will be generated by the generation job and used to publish the SDK.
type: string
default: 'sdk'
jobs:
show-inputs:
runs-on: ubuntu-latest
steps:
- name: Show inputs
run: |
echo "SDK Name: ${{ inputs.name }}"
echo "SDK Version: ${{ inputs.version }}"
echo "SDK Repository Ref: ${{ inputs.sdk_repo_ref }}"
echo "Repository: ${{ inputs.repository }}"
echo "Ref: ${{ inputs.ref }}"
echo "Transformations: ${{ inputs.transformations }}"
echo "Sources Path: ${{ inputs.sources_path }}"
echo "SDK Key: ${{ inputs.sdk_key }}"
echo "SDK Repository Key: ${{ inputs.sdk_repo_key }}"
transform-specs:
uses: ./.github/workflows/selfserve-transform-specs.yaml
with:
transformations: ${{ inputs.transformations }}
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
generate-sdk:
uses: ./.github/workflows/selfserve-generate-sdk.yaml
needs: [ transform-specs ]
with:
name: ${{ inputs.name }}
version: ${{ inputs.version }}
sdk_key: ${{ inputs.sdk_key }}
sdk_repo_ref: ${{ inputs.sdk_repo_ref }}
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
publish-sources:
uses: ./.github/workflows/selfserve-publish-sources.yaml
needs: [ generate-sdk ]
with:
version: ${{ inputs.version }}
path: ${{ inputs.sources_path }}
sdk_key: ${{ inputs.sdk_key }}