From f124cc577bd9ea6bc1ec2f2a057d18ee592491e8 Mon Sep 17 00:00:00 2001 From: Scott Brenner Date: Tue, 30 Jul 2019 19:37:29 -0700 Subject: [PATCH] Update main.workflow --- .github/main.workflow | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/main.workflow diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 0000000..d83bbb1 --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,42 @@ +workflow "Build and Publish" { + on = "push" + resolves = "Publish" +} + +action "Lint" { + uses = "actions/action-builder/shell@master" + runs = "make" + args = "lint" +} + +action "Test" { + uses = "actions/action-builder/shell@master" + runs = "make" + args = "test" +} + +action "Build" { + needs = ["Lint", "Test"] + uses = "actions/action-builder/docker@master" + runs = "make" + args = "build" +} + +action "Publish Filter" { + needs = ["Build"] + uses = "actions/bin/filter@master" + args = "branch master" +} + +action "Docker Login" { + needs = ["Publish Filter"] + uses = "actions/docker/login@master" + secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"] +} + +action "Publish" { + needs = ["Docker Login"] + uses = "actions/action-builder/docker@master" + runs = "make" + args = "publish" +}