Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
- run: pnpm build

docker-build:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Docker Image

on:
push:
branches: [master]
tags: ["v*"]
workflow_dispatch:

permissions:
contents: read
packages: write

concurrency:
group: docker-image-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=sha-

- name: Build and push image
id: build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: mode=max
sbom: true

- name: Add image digest to summary
run: |
echo "### Published image" >> "$GITHUB_STEP_SUMMARY"
echo '```text' >> "$GITHUB_STEP_SUMMARY"
echo "${{ steps.meta.outputs.tags }}" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
echo "Digest: \`${{ steps.build.outputs.digest }}\`" >> "$GITHUB_STEP_SUMMARY"
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ OIDC_AUTO_SEED_SIGNING_KEY=true
docker compose -f deploy/docker-compose.prod.yml up -d --build
```

主仓库的 `master` 分支和 `v*` 版本标签会通过 GitHub Actions 自动构建
`linux/amd64`、`linux/arm64` 镜像并发布到 GitHub Container Registry:

```bash
docker pull ghcr.io/cqut-openproject/cqut-auth:latest
```

`master` 会生成 `latest`、`master` 和 `sha-<commit>` 标签;例如 `v1.2.3`
版本标签还会生成 `v1.2.3`、`1.2.3`、`1.2` 和 `1`。如果镜像包未设置为公开,
拉取前需要先使用具有 `read:packages` 权限的 GitHub Token 登录 `ghcr.io`。

确认 `/health/live` 和 Discovery 正常后,将 `OIDC_AUTO_SEED_SIGNING_KEY` 改回 `false` 并重启。后续签名密钥由数据库管理,不需要每次启动重新生成。此时 `/health/ready` 仍可能因为邮件尚未配置而返回 `503`。

### 3. 配置反向代理
Expand Down
277 changes: 0 additions & 277 deletions docs/integration-bugs.md

This file was deleted.

Loading