mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-03-04 19:10:26 +00:00
- 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
22 lines
465 B
HCL
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"]
|
|
}
|