-
Notifications
You must be signed in to change notification settings - Fork 28
/
single-action.workflow
49 lines (41 loc) · 976 Bytes
/
single-action.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
45
46
47
48
49
workflow "Build and Publish" {
on = "push"
resolves = "Docker Publish"
}
action "Shell Lint" {
uses = "actions/bin/shellcheck@master"
args = "entrypoint.sh"
}
action "Test" {
uses = "actions/bin/bats"
args = "test/*.bats"
}
action "Docker Lint" {
uses = "docker://replicated/dockerfilelint"
args = ["Dockerfile"]
}
action "Build" {
needs = ["Shell Lint", "Test", "Docker Lint"]
uses = "actions/docker/cli@master"
args = "build -t npm ."
}
action "Docker Tag" {
needs = ["Build"]
uses = "actions/docker/tag@master"
args = "npm github/npm --no-latest"
}
action "Publish Filter" {
needs = ["Build"]
uses = "actions/bin/filter@master"
args = "branch master"
}
action "Docker Login" {
needs = ["Publish Filter"]
uses = "actions/docker/login@master"
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"]
}
action "Docker Publish" {
needs = ["Docker Tag", "Docker Login"]
uses = "actions/docker/cli@master"
args = "push github/npm"
}