mirror of
https://github.com/Borales/actions-yarn.git
synced 2026-03-24 13:52:20 +08:00
50 lines
989 B
HCL
50 lines
989 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 yarn ."
|
|
}
|
|
|
|
action "Docker Tag" {
|
|
needs = ["Build"]
|
|
uses = "actions/docker/tag@master"
|
|
args = "yarn borales/yarn --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 borales/yarn"
|
|
}
|