forked from lotharschulz/hello-github-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.workflow
44 lines (38 loc) · 1.02 KB
/
main.workflow
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
workflow "build, test, benchmark, docker build/push & shaking finger" {
on = "pull_request"
resolves = [
"test",
"benchmark",
"post gif on fail",
"docker.build",
"docker.push",
]
}
action "test" {
uses = "lotharschulz/hello-github-actions/action@master"
args = ["make test"]
}
action "benchmark" {
uses = "lotharschulz/hello-github-actions/action@master"
args = ["make benchmark"]
}
action "post gif on fail" {
uses = "jessfraz/shaking-finger-action@master"
secrets = ["GITHUB_TOKEN"]
}
action "docker.build" {
uses = "actions/docker/cli@master"
args = "build -t lotharschulz/hello-github-actions:$GITHUB_SHA ."
needs = ["test"]
}
action "docker.login" {
uses = "actions/docker/login@master"
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"]
needs = ["docker.build"]
}
action "docker.push" {
uses = "actions/docker/cli@master"
needs = ["docker.login"]
secrets = ["GITHUB_TOKEN", "DOCKER_PASSWORD", "DOCKER_USERNAME"]
args = "push lotharschulz/hello-github-actions:$GITHUB_SHA"
}