feat: add managed installation and system updates
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Security vulnerability / 安全漏洞
|
||||
url: https://github.com/LanQin996/LanQin-Email/security/advisories/new
|
||||
url: https://github.com/zxyszx/NewSzxcn-Email/security/advisories/new
|
||||
about: Please report security vulnerabilities privately. / 请通过私密渠道报告安全漏洞,不要公开提交漏洞细节。
|
||||
- name: Community chat / 社区交流
|
||||
url: https://t.me/+EhII7MSyi3QwNDQ5
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
cache-dependency-path: pnpm-lock.yaml
|
||||
|
||||
- name: Install web dependencies
|
||||
run: pnpm install --frozen-lockfile --filter lanqin-email-web...
|
||||
run: pnpm install --frozen-lockfile --filter newszxcn-email-web...
|
||||
|
||||
- name: Check shadcn/ui usage
|
||||
run: pnpm --dir apps/web run check:shadcn
|
||||
|
||||
@@ -17,7 +17,6 @@ concurrency:
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
PLATFORMS: linux/amd64
|
||||
|
||||
jobs:
|
||||
checks:
|
||||
@@ -40,7 +39,7 @@ jobs:
|
||||
cache-dependency-path: pnpm-lock.yaml
|
||||
|
||||
- name: Install web dependencies
|
||||
run: pnpm install --frozen-lockfile --filter lanqin-email-web...
|
||||
run: pnpm install --frozen-lockfile --filter newszxcn-email-web...
|
||||
|
||||
- name: Check shadcn/ui usage
|
||||
run: pnpm --dir apps/web run check:shadcn
|
||||
@@ -76,9 +75,11 @@ jobs:
|
||||
version="${version#.}"
|
||||
version="${version#-}"
|
||||
release_url="https://github.com/${GITHUB_REPOSITORY}/releases/tag/${tag}"
|
||||
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
|
||||
echo "version=${version}" >> "$GITHUB_OUTPUT"
|
||||
echo "release_url=${release_url}" >> "$GITHUB_OUTPUT"
|
||||
{
|
||||
echo "tag=${tag}"
|
||||
echo "version=${version}"
|
||||
echo "release_url=${release_url}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
echo "::notice::Docker release tag: ${tag}"
|
||||
|
||||
docker:
|
||||
@@ -93,35 +94,42 @@ jobs:
|
||||
suffix: ""
|
||||
context: .
|
||||
file: ./deploy/all-in-one/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- name: api
|
||||
suffix: -api
|
||||
context: .
|
||||
file: ./deploy/api.Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- name: web
|
||||
suffix: -web
|
||||
context: .
|
||||
file: ./deploy/web.Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- name: postfix
|
||||
suffix: -postfix
|
||||
context: ./deploy/postfix
|
||||
file: ./deploy/postfix/Dockerfile
|
||||
platforms: linux/amd64
|
||||
- name: dovecot
|
||||
suffix: -dovecot
|
||||
context: ./deploy/dovecot
|
||||
file: ./deploy/dovecot/Dockerfile
|
||||
platforms: linux/amd64
|
||||
- name: rspamd
|
||||
suffix: -rspamd
|
||||
context: ./deploy/rspamd
|
||||
file: ./deploy/rspamd/Dockerfile
|
||||
platforms: linux/amd64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v3
|
||||
@@ -135,9 +143,11 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
image="${REGISTRY}/${GITHUB_REPOSITORY}${{ matrix.suffix }}"
|
||||
echo "name=${image,,}" >> "$GITHUB_OUTPUT"
|
||||
echo "tag=${{ needs.release.outputs.tag }}" >> "$GITHUB_OUTPUT"
|
||||
echo "version=${{ needs.release.outputs.version }}" >> "$GITHUB_OUTPUT"
|
||||
{
|
||||
echo "name=${image,,}"
|
||||
echo "tag=${{ needs.release.outputs.tag }}"
|
||||
echo "version=${{ needs.release.outputs.version }}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
@@ -158,9 +168,11 @@ jobs:
|
||||
with:
|
||||
context: ${{ matrix.context }}
|
||||
file: ${{ matrix.file }}
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
platforms: ${{ matrix.platforms }}
|
||||
push: true
|
||||
build-args: |
|
||||
APP_VERSION=${{ needs.release.outputs.tag }}
|
||||
APP_COMMIT=${{ github.sha }}
|
||||
VITE_APP_VERSION=${{ needs.release.outputs.tag }}
|
||||
VITE_RELEASE_URL=${{ needs.release.outputs.release_url }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
@@ -197,18 +209,20 @@ jobs:
|
||||
fi
|
||||
|
||||
if ! gh api -X POST "repos/${repo}/releases/generate-notes" "${generate_args[@]}" --jq '.body' > generated-release-notes.md; then
|
||||
echo "GitHub 自动生成更新日志失败,已回退到提交列表。" > generated-release-notes.md
|
||||
echo >> generated-release-notes.md
|
||||
if [[ -n "${previous_tag}" ]]; then
|
||||
git log --reverse --pretty=format:"- %s ([%h](${repo_url}/commit/%H))" "${previous_tag}..${tag}" >> generated-release-notes.md
|
||||
echo >> generated-release-notes.md
|
||||
echo >> generated-release-notes.md
|
||||
echo "完整更新日志: [${previous_tag}...${tag}](${repo_url}/compare/${previous_tag}...${tag})" >> generated-release-notes.md
|
||||
else
|
||||
echo "- 首个公开版本。" >> generated-release-notes.md
|
||||
echo >> generated-release-notes.md
|
||||
echo "当前提交: [${GITHUB_SHA:0:7}](${repo_url}/commit/${GITHUB_SHA})" >> generated-release-notes.md
|
||||
fi
|
||||
{
|
||||
echo "GitHub 自动生成更新日志失败,已回退到提交列表。"
|
||||
echo
|
||||
if [[ -n "${previous_tag}" ]]; then
|
||||
git log --reverse --pretty=format:"- %s ([%h](${repo_url}/commit/%H))" "${previous_tag}..${tag}"
|
||||
echo
|
||||
echo
|
||||
echo "完整更新日志: [${previous_tag}...${tag}](${repo_url}/compare/${previous_tag}...${tag})"
|
||||
else
|
||||
echo "- 首个公开版本。"
|
||||
echo
|
||||
echo "当前提交: [${GITHUB_SHA:0:7}](${repo_url}/commit/${GITHUB_SHA})"
|
||||
fi
|
||||
} > generated-release-notes.md
|
||||
fi
|
||||
|
||||
cat > release-notes.md <<EOF
|
||||
|
||||
Reference in New Issue
Block a user