mirror of
https://github.com/jiangrui1994/CloudSaver.git
synced 2026-01-11 07:38:45 +08:00
Update docker-build-test.yml
This commit is contained in:
13
.github/workflows/docker-build-test.yml
vendored
13
.github/workflows/docker-build-test.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Build and Push Docker Image for Test
|
name: Build and Push Multi-Arch Docker Image for Test
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
workflow_dispatch: # 添加手动触发
|
workflow_dispatch: # 添加手动触发
|
||||||
jobs:
|
jobs:
|
||||||
@@ -28,10 +28,17 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: 构建并推送 Docker 镜像
|
- name: 设置 QEMU 支持多架构
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: 设置 Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: 构建并推送多架构 Docker 镜像
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64 # 指定架构:x86_64 和 ARM64
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ env.LOWER_NAME }}:test
|
ghcr.io/${{ env.LOWER_NAME }}:test
|
||||||
|
|||||||
Reference in New Issue
Block a user