Skip to content

Commit ae40a6a

Browse files
authored
Create docker-image.yml
【新增】docker构建
1 parent 1f20b81 commit ae40a6a

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/docker-image.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Set up QEMU
14+
uses: docker/setup-qemu-action@v3
15+
- name: Login to Docker Hub
16+
uses: docker/login-action@v3
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_TOKEN }}
20+
# - name: Extract version from Git tag
21+
# id: vars
22+
# run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
25+
- name: Build and push
26+
uses: docker/build-push-action@v6
27+
with:
28+
platforms: |
29+
linux/amd64
30+
linux/arm64
31+
push: true
32+
no-cache: true
33+
tags: |
34+
btpanel/btshieldmL:latest

0 commit comments

Comments
 (0)