diff --git a/.github/main.workflow b/.github/main.workflow index b45bb2a..b07ec7e 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -1,17 +1,27 @@ workflow "New workflow" { on = "push" - resolves = ["./scripts/publish-manager.sh"] + resolves = ["push"] } action "Docker Registry" { uses = "actions/docker/login@86ff551d26008267bb89ac11198ba7f1d807b699" + secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD", "DOCKER_REGISTRY_URL"] } -action "./scripts/publish-manager.sh" { - uses = "./scripts/publish-manager.sh" +action "build" { + uses = "actions/docker/cli@master" needs = ["Docker Registry"] - env = { - TAG = "latest" - REGISTRY = "docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker" - } + args = "build -t docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker:latest ." +} + +action "master" { + needs = ["build"] + uses = "actions/bin/filter@master" + args = "branch master" +} + +action "push" { + uses = "actions/docker/cli@master" + needs = ["master"] + args = "push docker.pkg.github.com/kubernetes-sigs/cluster-api-provider-docker:latest" }