-
Notifications
You must be signed in to change notification settings - Fork 39
/
github-actions-template.yaml
99 lines (95 loc) · 3.09 KB
/
github-actions-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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: github-actions-template
title: Trigger workflow
description: Triggers workflow.
spec:
owner: backstage/techdocs-core
type: service
parameters:
- title: "Repo 2"
properties:
repo:
type: string
title: Repository/Service Name
description: name (in lower-kebab-case) used for the repository and service
workflow:
type: string
# repoUrl:
# type: string
# ui:field: RepoUrlPicker
# ui:options:
# allowedHosts:
# - github.com
# owner:
# type: string
# ui:field: OwnerPicker
# person:
# type: object
# properties:
# name:
# type: string
# age:
# type: number
steps:
- action: debug:log
id: log-name
name: Log Message 1
input:
message: "${{ parameters.repoUrl }}"
- action: debug:log
id: log-name
name: Log Message 2
input:
message: ${{ '${{ parameters.repoUrl }}' }}
- action: debug:log
id: log-name
name: Log Message 3
input:
message: "{ % raw % } ${{ parameters.repoUrl }} {% endraw %}"
- action: github:actions:dispatch
id: trigger-build
name: Trigger Build 1
input:
repoUrl: "github.com?repo=${{ parameters.repo }}&owner=sblausten"
workflowId: ${{ parameters.workflow }}
branchOrTagName: "main"
# - id: push
# action: publish:github
# input:
# repoUrl: ${{ parameters.repoUrl }}
# - id: publish
# name: Publish
# action: publish:github
# input:
# repoUrl: ${{ parameters.repoUrl }}
# token: ${{ secrets.USER_OAUTH_TOKEN }}
# requiredCodeOwnerReviews: true
# sourcePath: ./new-repo
# allowedHosts: ['github.com']
# description: ${{ parameters.description }}
# access: ${{ parameters.repoUrl | replace(r/.*owner=/, "") | replace(r/&repo=.*/, "") }}/${{ parameters.repoOwner }}
# repoVisibility: internal
# defaultBranch: main
# deleteBranchOnMerge: true
# allowMergeCommit: false
# allowSquashMerge: true
# allowRebaseMerge: false
# - id: publish
# name: Publish
# action: publish:github
# input:
# sourcePath: new-repo
# allowedHosts: ['github.com']
# description: ${{ parameters.description }}
# repoUrl: ${{ parameters.repoUrl }}
# token: ${{ secrets.USER_OAUTH_TOKEN }}
# access: ${{ parameters.repoUrl | replace(r/.*owner=/, "") | replace(r/&repo=.*/, "") }}/${{ parameters.repoOwner }}
# requireCodeOwnerReviews: false
# repoVisibility: internal
# defaultBranch: main
# deleteBranchOnMerge: true
# allowMergeCommit: false
# allowSquashMerge: true
# allowRebaseMerge: false