Skip to content

Commit ea5c4db

Browse files
committed
Docker image release
1 parent cecf036 commit ea5c4db

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish Container Image
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Docker meta
14+
id: meta
15+
uses: docker/metadata-action@v5
16+
with:
17+
images: |
18+
mbcrawfo/knowledge-base-server
19+
tags: type=semver,pattern={{version}}
20+
21+
- name: Login to Docker Hub
22+
if: github.event_name != 'pull_request'
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ vars.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_TOKEN }}
27+
28+
- name: Clone the repo
29+
uses: actions/checkout@v4
30+
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v3
36+
37+
- name: Build and push
38+
uses: docker/build-push-action@v6
39+
with:
40+
context: .
41+
file: src/KnowledgeBaseServer/Dockerfile
42+
push: ${{ github.event_name != 'pull_request' }}
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)