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

Commit

Permalink
revamp of tag and push workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Chuck Ha <chuckh@vmware.com>
  • Loading branch information
chuckha committed Jul 24, 2019
1 parent 7e67053 commit 06e7995
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
16 changes: 13 additions & 3 deletions .github/main.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,21 @@ action "goreleaser" {
uses = "docker://goreleaser/goreleaser"
secrets = ["GORELEASER_GITHUB_TOKEN"]
args = "release"
needs = ["is-tag", "Setup Google Cloud", "Set Credential Helper for Docker"]
needs = ["is-tag"]
}

action "tag images" {
uses = "actions/docker/tag@master"
args = "capd-manager gcr.io/kubernetes1-226021/capd-manager"
needs = ["goreleaser"]
}

action "push images" {
uses = "actions/docker/cli@master"
args = "images --filter reference=gcr.io/kubernetes1-226021/capd-manager --format '{{.Repository}}:{{.Tag}}' | xargs -n1 docker push"
needs = ["goreleaser"]
runs = "sh -c"
env = {
IMAGE_NAME = gcr.io/kubernetes1-226021/capd-manager
}
args = "source $HOME/.profile && docker push $IMAGE_NAME:latest && docker push $IMAGE_NAME:$IMAGE_REF && docker push $IMAGE_NAME:$IMAGE_SHA && docker push $IMAGE_NAME:$IMAGE_VERSION"
needs = ["tag images", "Set Credential Helper for Docker"]
}
4 changes: 1 addition & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,4 @@ dockers:
binaries:
- capd-manager
image_templates:
- "gcr.io/kubernetes1-226021/capd-manager:{{.Version}}"
- "gcr.io/kubernetes1-226021/capd-manager:{{.Major}}.{{.Minor}}"
- "gcr.io/kubernetes1-226021/capd-manager:latest"
- capd-manager

0 comments on commit 06e7995

Please sign in to comment.