Co-authored-by: Nick Van Wiggeren <nickvanw@github.com> Co-authored-by: Thomas Osowski <osowskit@github.com> Co-authored-by: Nick Van Wiggeren <nickvanw@users.noreply.github.com> Co-authored-by: Max Schoening <max@max.wtf> Co-authored-by: Steve Winton <stevewinton@gmail.com> Co-authored-by: Tom Osowski <osowskit@github.com> Co-authored-by: Brandon Keepers <bkeepers@github.com> Co-authored-by: Max Schoening <max@github.com> Co-authored-by: Steve Winton <swinton@users.noreply.github.com> Co-authored-by: Guðmundur Bjarni Ólafsson <gudmundur@github.com> Co-authored-by: Mike Coutermarsh <mscoutermarsh@github.com>
50 lines
995 B
HCL
50 lines
995 B
HCL
workflow "Build and Publish" {
|
|
on = "push"
|
|
resolves = "Docker Publish"
|
|
}
|
|
|
|
action "Shell Lint" {
|
|
uses = "actions/bin/shellcheck@master"
|
|
args = "entrypoint.sh"
|
|
}
|
|
|
|
action "Test" {
|
|
uses = "actions/bin/bats@master"
|
|
args = "test/*.bats"
|
|
}
|
|
|
|
action "Docker Lint" {
|
|
uses = "docker://replicated/dockerfilelint"
|
|
args = ["Dockerfile"]
|
|
}
|
|
|
|
action "Build" {
|
|
needs = ["Shell Lint", "Test", "Docker Lint"]
|
|
uses = "actions/docker/cli@master"
|
|
args = "build -t heroku ."
|
|
}
|
|
|
|
action "Docker Tag" {
|
|
needs = ["Build"]
|
|
uses = "actions/docker/tag@master"
|
|
args = "heroku github/heroku --no-latest"
|
|
}
|
|
|
|
action "Publish Filter" {
|
|
needs = ["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 "Docker Publish" {
|
|
needs = ["Docker Tag", "Docker Login"]
|
|
uses = "actions/docker/cli@master"
|
|
args = "push github/heroku"
|
|
}
|