diff --git a/.github/main.workflow b/.github/main.workflow index 56df830..fef4a66 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -3,25 +3,31 @@ workflow "New workflow" { resolves = ["push"] } +action "master" { + uses = "actions/bin/filter@master" + args = "branch master" +} + action "Docker Registry" { + needs = ["master"] uses = "actions/docker/login@86ff551d26008267bb89ac11198ba7f1d807b699" secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD", "DOCKER_REGISTRY_URL"] } action "build" { - uses = "actions/docker/cli@master" needs = ["Docker Registry"] - args = "build -t docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager:latest ." + uses = "actions/docker/cli@master" + args = "build -t base ." } -action "master" { +action "tag" { needs = ["build"] - uses = "actions/bin/filter@master" - args = "branch master" + uses = "actions/docker/tag@master" + args = "base docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager" } action "push" { + needs = ["tag"] uses = "actions/docker/cli@master" - needs = ["master"] - args = "push docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager:latest" + args = "push docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker/manager" }