Skip to content

Commit 1a7a8c0

Browse files
author
wangdashuaihenshuai
committed
add docker hub image push.
1 parent 52b5081 commit 1a7a8c0

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/build_docker.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ name: Create and publish a dev Docker image
1111

1212
on:
1313
push:
14-
branches: ['main']
14+
branches: ["main", "feat/add_docker_hub_spport"]
1515

1616
env:
1717
REGISTRY: ghcr.io
@@ -64,6 +64,21 @@ jobs:
6464
tags: ${{ steps.meta.outputs.tags }}
6565
labels: ${{ steps.meta.outputs.labels }}
6666

67+
- name: Login to DockerHub
68+
uses: docker/login-action@v2
69+
with:
70+
username: huolalatech
71+
password: ${{ secrets.DOCKERHUB_TOKEN }}
72+
73+
- name: Build and push
74+
id: docker_build
75+
uses: docker/build-push-action@v4
76+
with:
77+
context: .
78+
push: true
79+
tags: ${{ steps.meta.outputs.tags }}
80+
labels: ${{ steps.meta.outputs.labels }}
81+
6782
- name: Lark bot notify
6883
env:
6984
TOKEN: ${{ secrets.LARK_BOT_TOKEN }}
@@ -72,4 +87,3 @@ jobs:
7287
curl "https://pagespy.blucas.me/lark/ci?branch=$BRANCH_NAME&actionId=$GITHUB_RUN_ID" \
7388
-X POST \
7489
-H "token: $TOKEN"
75-

0 commit comments

Comments
 (0)