mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-11 23:45:11 +08:00
引入项目基础目录结构,包含多语言支持、主要页面与组件、核心游戏逻辑、UI 组件库、加密与本地持久化、自动化 Docker 构建流程、GitHub issue 模板(中英文)、README(中英文)、LICENSE 及开发配置文件。实现 OGame 单机版主要功能模块,为后续开发和扩展奠定基础。
105 lines
3.1 KiB
YAML
105 lines
3.1 KiB
YAML
name: 自动化创建Docker镜像
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-amd64:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: 检查代码
|
|
uses: actions/checkout@v2
|
|
|
|
- name: 登录 GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
- name: 登录 Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: 构建并推送 amd64 Docker镜像
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64
|
|
push: true
|
|
tags: |
|
|
ghcr.io/${{ github.repository_owner }}/blist:amd64
|
|
${{ secrets.DOCKERHUB_USERNAME }}/blist:amd64
|
|
|
|
build-arm64:
|
|
runs-on: ubuntu-22.04-arm
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: 检查代码
|
|
uses: actions/checkout@v2
|
|
|
|
- name: 登录 GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
- name: 登录 Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: 构建并推送 arm64 Docker镜像
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
platforms: linux/arm64
|
|
push: true
|
|
tags: |
|
|
ghcr.io/${{ github.repository_owner }}/blist:arm64
|
|
${{ secrets.DOCKERHUB_USERNAME }}/blist:arm64
|
|
|
|
create-manifest:
|
|
needs: [build-amd64, build-arm64]
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- name: 登录 GitHub Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GHCR_TOKEN }}
|
|
|
|
- name: 登录 Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: 创建并推送多架构清单
|
|
run: |
|
|
# GitHub Container Registry
|
|
docker manifest create ghcr.io/${{ github.repository_owner }}/blist:latest \
|
|
ghcr.io/${{ github.repository_owner }}/blist:amd64 \
|
|
ghcr.io/${{ github.repository_owner }}/blist:arm64
|
|
docker manifest push ghcr.io/${{ github.repository_owner }}/blist:latest
|
|
|
|
# Docker Hub
|
|
docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/blist:latest \
|
|
${{ secrets.DOCKERHUB_USERNAME }}/blist:amd64 \
|
|
${{ secrets.DOCKERHUB_USERNAME }}/blist:arm64
|
|
docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/blist:latest |