From fe091ae1b6627db6edb5f9870a394d75b2b8a7a9 Mon Sep 17 00:00:00 2001 From: Vincent Composieux Date: Thu, 22 Aug 2019 08:49:00 +0200 Subject: [PATCH] Update dockerimage.yml --- .github/main.workflow | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/main.workflow diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 0000000..8c9352f --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,31 @@ +workflow "Build and Publish" { + on = "push" + resolves = ["Master", "Docker Push"] +} + +# Filter for master branch +action "Master" { + uses = "actions/bin/filter@master" + args = "branch master" +} + +action "Docker Build" { + uses = "actions/docker/cli@fe7ed3ce992160973df86480b83a2f8ed581cd50" + needs = ["Master"] + args = "build -t pihole-exporter ." +} + +action "Docker Registry" { + uses = "actions/docker/login@fe7ed3ce992160973df86480b83a2f8ed581cd50" + env = { + DOCKER_REGISTRY_URL = "docker.pkg.github.com" + } + secrets = ["DOCKER_PASSWORD", "DOCKER_USERNAME"] + needs = ["Docker Build"] +} + +action "Docker Push" { + uses = "actions/docker/cli@fe7ed3ce992160973df86480b83a2f8ed581cd50" + args = "push pihole-exporter" + needs = ["Docker Registry"] +}