Add main workflow
This commit is contained in:
parent
07559fc684
commit
de8caf2eb0
1 changed files with 30 additions and 0 deletions
30
.github/main.workflow
vendored
Normal file
30
.github/main.workflow
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
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"]
|
||||
}
|
Loading…
Reference in a new issue