Skip to content

Commit b8640d7

Browse files
committed
feat: add ci to build and publish to ghcr
1 parent 8163b12 commit b8640d7

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: mesastream
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
8+
jobs:
9+
build:
10+
runs-on: [self-hosted, linux, arm64]
11+
permissions:
12+
contents: read
13+
packages: write
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v3
19+
20+
- name: Log in to GHCR
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Docker metadata
28+
id: meta
29+
uses: docker/metadata-action@v5
30+
with:
31+
images: ghcr.io/${{ github.repository_owner }}/mesastream
32+
tags: |
33+
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
34+
type=ref,event=tag
35+
36+
- name: Build and push
37+
uses: docker/build-push-action@v6
38+
with:
39+
context: .
40+
file: Dockerfile
41+
push: true
42+
tags: ${{ steps.meta.outputs.tags }}
43+
cache-from: type=gha
44+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)