From de8caf2eb074a76b2c0f86d920060f2d024ee93b Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 8 Dec 2018 10:34:05 +0100 Subject: [PATCH] Add main workflow --- .github/main.workflow | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/main.workflow diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 0000000..43a06c5 --- /dev/null +++ b/.github/main.workflow @@ -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"] +}