mirror of
https://github.com/zhigang1992/actions.git
synced 2026-01-12 17:12:24 +08:00
Merge pull request #13 from unacast/docker-publish
Use github actions to publish to docker hub
This commit is contained in:
21
.github/main.workflow
vendored
21
.github/main.workflow
vendored
@@ -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"
|
||||
}
|
||||
|
||||
4
Makefile
4
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
|
||||
Reference in New Issue
Block a user