fix(ci): Fix push document image error (#2273)

This commit is contained in:
Fangyin Cheng
2025-01-03 20:09:06 +08:00
committed by GitHub
parent de629f467d
commit 5b88097aba
3 changed files with 18 additions and 6 deletions

View File

@@ -6,9 +6,11 @@ on:
- main
paths:
- 'docs/**'
- '.github/workflows/docker-image-publish.yml'
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docker-image-publish.yml'
release:
types: [published]
workflow_dispatch:
@@ -36,12 +38,22 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
# Only run when there is a PR
- name: Build PR
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v4
with:
context: .
file: ./docs/Dockerfile-deploy
platforms: linux/amd64
# Only push when not in PR
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ github.event_name != 'pull_request' && 'eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest' || '' }}
push: false
# Only run when it is not a PR, build and push the image
- name: Build and push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v4
with:
context: .
file: ./docs/Dockerfile-deploy
platforms: linux/amd64
push: true
tags: eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest

View File

@@ -9,7 +9,7 @@ on:
concurrency:
group: ${{ github.event.number || github.run_id }}
cancel-in-progress: true
cancel-in-progress: false
jobs:
build:

View File

@@ -18,7 +18,7 @@ on:
concurrency:
group: ${{ github.event.number || github.run_id }}
cancel-in-progress: true
cancel-in-progress: false
#permissions:
# contents: read