mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-11 23:45:11 +08:00
重构App.vue,首页独立无侧边栏,其他页面采用统一侧边栏布局。新增右下角固定通知区,集成返回顶部、队列通知、外交通知和敌方警报。移除新手引导组件,替换为弱引导提示系统。支持星球重命名弹窗。优化NPC成长与行为定时器逻辑,提升性能和可维护性。删除issue模板及相关文档描述。
60 lines
2.0 KiB
YAML
60 lines
2.0 KiB
YAML
name: Docker 多架构构建并发布
|
||
|
||
on:
|
||
push:
|
||
branches: [ main ]
|
||
tags: [ 'v*.*.*' ] # 打 tag 时也触发
|
||
workflow_dispatch:
|
||
|
||
permissions:
|
||
contents: read
|
||
packages: write
|
||
|
||
jobs:
|
||
build-and-push:
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: 检出代码
|
||
uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
# QEMU 用于支持多架构构建(必须)
|
||
- name: 设置 QEMU
|
||
uses: docker/setup-qemu-action@v3
|
||
|
||
# Buildx 是目前官方唯一推荐的多架构构建方式
|
||
- name: 设置 Docker Buildx
|
||
uses: docker/setup-buildx-action@v3
|
||
|
||
# 登录 GHCR(始终执行)
|
||
- name: 登录 GitHub Container Registry
|
||
uses: docker/login-action@v3
|
||
with:
|
||
registry: ghcr.io
|
||
username: ${{ github.actor }}
|
||
password: ${{ secrets.GITHUB_TOKEN }}
|
||
|
||
# 登录 Docker Hub(只在用户名存在时执行)
|
||
- name: 登录 Docker Hub
|
||
if: vars.DOCKERHUB_USERNAME != '' # 只检查 vars,忽略 secrets
|
||
uses: docker/login-action@v3
|
||
with:
|
||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||
|
||
# 真正一键构建 + 推送多架构镜像(amd64 + arm64)
|
||
- name: 构建并推送多架构镜像
|
||
uses: docker/build-push-action@v6
|
||
with:
|
||
context: .
|
||
platforms: linux/amd64,linux/arm64
|
||
push: true
|
||
tags: |
|
||
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:latest
|
||
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:${{ github.sha }}
|
||
${{ vars.DOCKERHUB_USERNAME != '' && format('docker.io/{0}/ogame-vue-ts:latest', vars.DOCKERHUB_USERNAME) || '' }}
|
||
${{ vars.DOCKERHUB_USERNAME != '' && format('docker.io/{0}/ogame-vue-ts:{1}', vars.DOCKERHUB_USERNAME, github.sha) || '' }}
|
||
cache-from: type=gha
|
||
cache-to: type=gha,mode=max
|
||
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=OGame Vue Ts |