-
Notifications
You must be signed in to change notification settings - Fork 314
70 lines (60 loc) · 2.24 KB
/
admin-release.yaml
File metadata and controls
70 lines (60 loc) · 2.24 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Admin API Release
on:
push:
tags:
- "admin/v*"
permissions:
contents: write
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
- name: Log in to GitHub Container Registry
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf
with:
images: ghcr.io/memodb-io/acontext-admin
tags: |
type=sha
type=semver,pattern={{version}},match=admin/v(\d+\.\d+\.\d+)$
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd
- name: Build and Push Docker image
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294
with:
platforms: linux/amd64,linux/arm64
context: ./src/server/api/go
file: ./src/server/api/go/Dockerfile.admin
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
sbom: true
provenance: mode=max
cache-from: type=gha,scope=acontext-admin
cache-to: type=gha,mode=max,scope=acontext-admin
- name: Generate Changelog
run: |
bash .github/scripts/generate-changelog.sh \
--tag-prefix "admin/v" \
--source-dir "src/server/api/go" \
--display-name "Admin API" \
--output "$GITHUB_WORKSPACE-CHANGELOG.txt" \
--footer "Published to https://github.com/memodb-io/Acontext/pkgs/container/acontext-admin"
- name: Create Release
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe
with:
body_path: ${{ github.workspace }}-CHANGELOG.txt