Skip to content

Commit c177819

Browse files
author
DylanBulmer
committed
update workflow
1 parent 42d6dc8 commit c177819

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,22 @@ on:
1111
- "main"
1212

1313
jobs:
14+
test:
15+
name: Test
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-node@v3
20+
with:
21+
node-version: "16.x"
22+
- run: yarn
23+
- run: yarn build
24+
- run: yarn test
25+
1426
# define job to build and publish docker image
1527
build-and-publish:
1628
name: Build and Publish Docker image
29+
needs: test
1730
# run only when code is compiling and tests are passing
1831
runs-on: ubuntu-latest
1932

@@ -33,9 +46,9 @@ jobs:
3346
tags: |
3447
type=ref,event=branch
3548
type=ref,event=pr
36-
type=semver,pattern={{version}}
37-
type=semver,pattern={{major}}.{{minor}}
38-
type=semver,pattern={{major}}
49+
type=semver,pattern=v{{version}}
50+
type=semver,pattern=v{{major}}.{{minor}}
51+
type=semver,pattern=v{{major}}
3952
type=sha
4053
type=raw,value=latest,enable={{is_default_branch}}
4154

0 commit comments

Comments
 (0)