diff --git a/.github/main.workflow b/.github/main.workflow index f529e02..9f16570 100644 --- a/.github/main.workflow +++ b/.github/main.workflow @@ -1,6 +1,6 @@ workflow "Build" { on = "push" - resolves = "Docker build" + resolves = "Publish" } action "Lint" { @@ -21,3 +21,22 @@ action "Docker build" { runs = "make" args = "build" } + +action "Publish Filter" { + needs = ["Docker 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" +} diff --git a/Makefile b/Makefile index 6d5944f..2c262bd 100644 --- a/Makefile +++ b/Makefile @@ -22,4 +22,8 @@ test: ## Call the 'test' target on all sub-modules .PHONY: dev-all dev-all: lint build test +.PHONY: publish +publish: ## Call the 'publish' target on all sub-modules + $(foreach mod,$(MODULES),($(MAKE) -C $(mod) $@) || exit $$?;) + include help.mk \ No newline at end of file diff --git a/README.md b/README.md index 59d95b1..075773d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # actions Various Github Actions + +# Dockerhub +Images are deployed to https://cloud.docker.com/u/unacast/repository/