Skip to content

Commit d8939e2

Browse files
committed
added release it
1 parent 1f7e362 commit d8939e2

4 files changed

Lines changed: 4489 additions & 926 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release Server Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'server-v*'
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Log in to GitHub Container Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Extract version from tag
30+
id: version
31+
run: echo "VERSION=${GITHUB_REF_NAME#server-v}" >> "$GITHUB_OUTPUT"
32+
33+
- name: Docker metadata
34+
id: meta
35+
uses: docker/metadata-action@v5
36+
with:
37+
images: ghcr.io/${{ github.repository }}/server
38+
tags: |
39+
type=semver,pattern={{version}},value=${{ steps.version.outputs.VERSION }}
40+
type=semver,pattern={{major}}.{{minor}},value=${{ steps.version.outputs.VERSION }}
41+
type=semver,pattern={{major}},value=${{ steps.version.outputs.VERSION }}
42+
type=raw,value=latest
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: ./packages/server
48+
file: ./packages/server/dockerfile
49+
push: true
50+
tags: ${{ steps.meta.outputs.tags }}
51+
labels: ${{ steps.meta.outputs.labels }}
52+
cache-from: type=gha
53+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)