Skip to content
This repository was archived by the owner on Sep 24, 2021. It is now read-only.

Commit 883b65d

Browse files
committed
a better tagging strategy
Signed-off-by: Chuck Ha <[email protected]>
1 parent c9bc76f commit 883b65d

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/main.workflow

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,31 @@ workflow "New workflow" {
33
resolves = ["push"]
44
}
55

6+
action "master" {
7+
uses = "actions/bin/filter@master"
8+
args = "branch master"
9+
}
10+
611
action "Docker Registry" {
12+
needs = ["master"]
713
uses = "actions/docker/login@86ff551d26008267bb89ac11198ba7f1d807b699"
814
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD", "DOCKER_REGISTRY_URL"]
915
}
1016

1117
action "build" {
12-
uses = "actions/docker/cli@master"
1318
needs = ["Docker Registry"]
14-
args = "build -t docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager:latest ."
19+
uses = "actions/docker/cli@master"
20+
args = "build -t base ."
1521
}
1622

17-
action "master" {
23+
action "tag" {
1824
needs = ["build"]
19-
uses = "actions/bin/filter@master"
20-
args = "branch master"
25+
uses = "actions/docker/tag@master"
26+
args = "base docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager"
2127
}
2228

2329
action "push" {
30+
needs = ["tag"]
2431
uses = "actions/docker/cli@master"
25-
needs = ["master"]
26-
args = "push docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager:latest"
32+
args = "push docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager"
2733
}

0 commit comments

Comments
 (0)