Skip to content

perf(api): cache ProjectAuth in Redis and increase DB connection pool… #5

perf(api): cache ProjectAuth in Redis and increase DB connection pool…

perf(api): cache ProjectAuth in Redis and increase DB connection pool… #5

Workflow file for this run

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