From 1a7a8c0d5da430f64ff60a752a65e9f8122b3cce Mon Sep 17 00:00:00 2001 From: wangdashuaihenshuai Date: Fri, 18 Oct 2024 14:26:57 +0800 Subject: [PATCH] add docker hub image push. --- .github/workflows/build_docker.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 44e859ff..a26dd199 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -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 @@ -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 }} @@ -72,4 +87,3 @@ jobs: curl "https://pagespy.blucas.me/lark/ci?branch=$BRANCH_NAME&actionId=$GITHUB_RUN_ID" \ -X POST \ -H "token: $TOKEN" -