-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathstep.yaml
More file actions
117 lines (116 loc) · 3.19 KB
/
step.yaml
File metadata and controls
117 lines (116 loc) · 3.19 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '1.0'
kind: step-type
metadata:
version: 0.2.3
name: github-action-executor
description: 'WARNING: This step is DEPRECATED. The purpose of this step was to execute github action'
maintainers:
- name: Pavel Kostohrys
icon:
type: feather
name: zap
color: '#000000'
background: '#ffffff'
sourceURL: 'https://github.com/codefresh-io/cf-step-builder'
sources:
- 'https://github.com/codefresh-io/cf-step-builder'
isPublic: true
categories:
- utility
examples:
- description: Execute github action created with Dockerfile
workflow:
runtime-executor:
title: Notify slack channel
type: github-action-executor
arguments:
url: 'https://github.com/marketplace/actions/slack-notify'
env:
SLACK_WEBHOOK: '${{SLACK_WEBHOOK}}'
SLACK_CHANNEL: general
SLACK_MESSAGE: Hello from codefresh!
SLACK_TITLE: Custom Title
SLACK_USERNAME: rtCamp
official: false
stage: incubating
latest: true
spec:
arguments: |-
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"description": "github action marketplace url"
},
"args": {
"type": "string",
"description": "github action args"
},
"env": {
"type": "object",
"description": "action environment variables"
},
"debug": {
"type": "boolean",
"description": "show debug logs"
},
"registry": {
"type": "string",
"description": "registry to push a builded image"
},
"registry_repo": {
"type": "string",
"description": "registry org name"
},
"cache": {
"type": "boolean",
"description": "enable/disable cache"
}
}
}
stepsTemplate: |
github_action_export_variables:
title: Exporting required variables
image: codefresh/github-action-converter
environment:
[[ if .Arguments.envs ]]- ENVS="[[ .Arguments.envs ]]"[[ end ]]
[[ if .Arguments.url ]]- REPO_URL=[[ .Arguments.url ]][[ end ]]
[[ if .Arguments.debug ]]- LOG_LEVEL=debug[[ end ]]
commands:
- /app/interface/cli/index.js export-variables
[[ if .Arguments.debug ]]
github_action_print:
image: alpine
title: envs
commands:
- printenv
[[ end ]]
github_action_clone:
type: git-clone
repo: ${{GA_GIT_REPO}}
github_action_build:
type: build
workingDirectory: ${{github_action_clone}}
repository: ${{GA_GIT_REPO_NAME}}
disablePush: true
dockerfile:
path: Dockerfile
tag: latest
github_action_step:
image: ${{github_action_build}}
volumes:
- ./${{CF_REPO_NAME}}:/github/workspace/${{CF_REPO_NAME}}
- ./:/github/workflow
[[ if .Arguments.args ]]
cmd: [[ .Arguments.args ]]
[[ end ]]
delimiters:
left: '[['
right: ']]'