Skip to content

Commit cb6f2e1

Browse files
authored
✨ Update workflow to include tests
1 parent 63dc5fb commit cb6f2e1

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

‎.github/main.workflow‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
workflow "Build and Push Docker Container" {
2-
resolves = ["Push Docker Image"]
2+
resolves = [
3+
"Push Docker Image",
4+
]
35
on = "push"
46
}
57

8+
action "Test Project" {
9+
uses = "actions/npm@59b64a598378f31e49cb76f27d6f3312b582f680"
10+
args = "ci && npm test"
11+
}
12+
613
action "Filters for GitHub Actions" {
714
uses = "actions/bin/filter@master"
15+
needs = ["Test Project"]
816
args = "branch master"
917
}
1018

1119
action "Build Docker Image" {
1220
uses = "actions/docker/cli@master"
1321
needs = ["Filters for GitHub Actions"]
1422
args = "build -t $CONTAINER_REGISTRY/$GITHUB_REPOSITORY ."
23+
env = {
24+
CONTAINER_REGISTRY = "registry.gitlab.com"
25+
}
1526
}
1627

1728
action "Login to Docker Registry" {

0 commit comments

Comments
 (0)