-
Notifications
You must be signed in to change notification settings - Fork 12
/
template.yaml
70 lines (66 loc) · 1.85 KB
/
template.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
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: hello-world-on-kubernetes
title: Hello World on Kubernetes
spec:
owner: muvaf/cloud-native-heroku
type: service
parameters:
- title: Provide metadata
required:
- serviceName
- owner
properties:
serviceName:
title: Service Name
type: string
description: Unique name of the component
ui:field: EntityNamePicker
owner:
title: Owner
type: string
description: Owner of the component
ui:field: OwnerPicker
ui:options:
allowedKinds:
- Group
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- github.com
steps:
- id: fetch-base
name: Fetch Base
action: fetch:template
input:
url: ./skeleton
values:
serviceName: ${{ parameters.serviceName }}
owner: ${{ parameters.owner }}
githubRepositoryOrg: ${{ (parameters.repoUrl | parseRepoUrl).owner }}
githubRepositoryName: ${{ (parameters.repoUrl | parseRepoUrl).repo }}
- id: publish
name: Publish
action: publish:github
input:
allowedHosts: ['github.com']
description: This is ${{ parameters.serviceName }}
repoUrl: ${{ parameters.repoUrl }}
repoVisibility: public
defaultBranch: main
protectDefaultBranch: false
requireCodeOwnerReviews: false
- id: register
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'