workout/.github/main.workflow

31 lines
706 B
Text
Raw Normal View History

2018-12-08 10:34:05 +01:00
workflow "New workflow" {
on = "push"
resolves = ["Login", "Push"]
}
action "Login" {
uses = "actions/docker/login@04185cf"
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"]
}
action "Pull" {
uses = "actions/docker/cli@04185cf"
needs = ["Login"]
args = "pull $DOCKER_USERNAME/$DOCKER_IMAGE"
secrets = ["DOCKER_USERNAME", "DOCKER_IMAGE"]
}
action "Build" {
uses = "actions/docker/cli@04185cf"
needs = ["Pull"]
args = "build -t $DOCKER_USERNAME/$DOCKER_IMAGE ."
secrets = ["DOCKER_USERNAME", "DOCKER_IMAGE"]
}
action "Push" {
uses = "actions/docker/cli@04185cf"
needs = ["Build"]
args = "push $DOCKER_USERNAME/$DOCKER_IMAGE"
secrets = ["DOCKER_USERNAME", "DOCKER_IMAGE"]
}