Skip to content

Commit 59a17d2

Browse files
committed
add CI Docker Hub autoDeploy
1 parent 758b76c commit 59a17d2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/docker.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Deploy Docker Hub
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
-
13+
name: Login to Docker Hub
14+
uses: docker/login-action@v3
15+
with:
16+
username: ${{ secrets.DOCKER_USERNAME }}
17+
password: ${{ secrets.DOCKER_USER_PASSWORD }}
18+
-
19+
name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
-
22+
name: Build and push
23+
uses: docker/build-push-action@v6
24+
with:
25+
platforms: linux/amd64,linux/arm64
26+
push: true
27+
tags: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}:latest

0 commit comments

Comments
 (0)