Skip to content

Commit 513bba3

Browse files
authored
Create docker-image.yml
1 parent 9e1b6aa commit 513bba3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker Image CI
2+
3+
on:
4+
workflow_dispatch: # 允许手动触发工作流
5+
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
architecture: [amd64, arm64]
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Set up QEMU
19+
uses: docker/setup-qemu-action@v1
20+
21+
- name: Set up Buildx
22+
uses: docker/setup-buildx-action@v1
23+
24+
- name: Log in to GitHub Container Registry
25+
uses: docker/login-action@v1
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }} # 使用当前 GitHub 用户名
29+
password: ${{ secrets.GITHUB_TOKEN }} # 使用您刚刚添加的个人访问令牌
30+
31+
- name: Build and push
32+
uses: docker/build-push-action@v2
33+
with:
34+
context: .
35+
file: ./Dockerfile_frontend
36+
push: true
37+
tags: lightislost/ekgfrontend:0.1.0
38+
platforms: linux/amd64,linux/arm64

0 commit comments

Comments
 (0)