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

Commit

Permalink
a better tagging strategy
Browse files Browse the repository at this point in the history
Signed-off-by: Chuck Ha <[email protected]>
  • Loading branch information
chuckha committed Jul 10, 2019
1 parent c9bc76f commit 883b65d
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/main.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit 883b65d

Please sign in to comment.