Files
podinfo/.github/main.workflow
Stefan Prodan d3208cd8ac Add custom GitHub action for docker tag and push
- if the push refers a branch the docker tag will be branch-sha
- if the push refers a git tag the docker tag will be th git tag
2018-10-26 14:29:16 +03:00

22 lines
465 B
HCL

workflow "Publish container" {
on = "push"
resolves = ["Docker tag and push"]
}
action "Test and build" {
uses = "actions/docker/cli@master"
args = "build -t app -f Dockerfile.ci ."
}
action "Docker login" {
needs = ["Test and build"]
uses = "actions/docker/login@master"
secrets = ["DOCKER_USERNAME", "DOCKER_PASSWORD"]
}
action "Docker tag and push" {
needs = ["Docker login"]
uses = "./.github/actions/docker"
secrets = ["DOCKER_IMAGE"]
}