-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.32 KB
/
deploy.yml
File metadata and controls
53 lines (46 loc) · 1.32 KB
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: Deploy
on:
push:
branches: [main]
paths:
- 'packages/**'
- 'docker/**'
- 'pnpm-lock.yaml'
jobs:
build-push:
name: Build & Push ${{ matrix.service }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
service: [api-server, mcp-server]
steps:
- uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version
id: version
run: echo "version=$(node -p 'require(\"./package.json\").version')" >> "$GITHUB_OUTPUT"
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/junixlabs/sidstack-${{ matrix.service }}
tags: |
type=raw,value=latest
type=sha,prefix=sha-,format=short
type=raw,value=v${{ steps.version.outputs.version }}
- name: Build & push
uses: docker/build-push-action@v6
with:
context: .
file: docker/${{ matrix.service }}/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}