Skip to content

Commit

Permalink
add docker hub image push.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdashuaihenshuai committed Oct 18, 2024
1 parent 52b5081 commit 1a7a8c0
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: Create and publish a dev Docker image

on:
push:
branches: ['main']
branches: ["main", "feat/add_docker_hub_spport"]

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -64,6 +64,21 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: huolalatech
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Lark bot notify
env:
TOKEN: ${{ secrets.LARK_BOT_TOKEN }}
Expand All @@ -72,4 +87,3 @@ jobs:
curl "https://pagespy.blucas.me/lark/ci?branch=$BRANCH_NAME&actionId=$GITHUB_RUN_ID" \
-X POST \
-H "token: $TOKEN"

0 comments on commit 1a7a8c0

Please sign in to comment.