31 lines
706 B
Text
31 lines
706 B
Text
|
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"]
|
||
|
}
|