Skip to content

Commit 71daaf3

Browse files
authored
Create test.yaml
1 parent 9892b57 commit 71daaf3

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/test.yaml

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

0 commit comments

Comments
 (0)