-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.04 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build and Test
on:
push:
branches:
- main
paths:
- 'package**.json'
- 'src/**'
pull_request:
paths:
- 'package**.json'
- 'src/**'
- 'Dockerfile'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
name: 🧪 Test
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Test
run: npm test
build-container:
name: 📦 Build Container
needs: test
runs-on: windows-latest
permissions:
contents: read
packages: write
id-token: write
attestations: write
steps:
- uses: actions/checkout@v4
- name: Docker Build
run: docker build . --file Dockerfile --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
deploy:
name: 🚀 Deploy
needs: build-container
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Deploy Step
run: echo "Deploying"