Skip to content

Commit 5b88097

Browse files
authored
fix(ci): Fix push document image error (#2273)
1 parent de629f4 commit 5b88097

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/workflows/doc-image-publish.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ on:
66
- main
77
paths:
88
- 'docs/**'
9+
- '.github/workflows/docker-image-publish.yml'
910
pull_request:
1011
paths:
1112
- 'docs/**'
13+
- '.github/workflows/docker-image-publish.yml'
1214
release:
1315
types: [published]
1416
workflow_dispatch:
@@ -36,12 +38,22 @@ jobs:
3638
username: ${{ secrets.DOCKERHUB_USERNAME }}
3739
password: ${{ secrets.DOCKERHUB_TOKEN }}
3840

41+
# Only run when there is a PR
42+
- name: Build PR
43+
if: github.event_name == 'pull_request'
44+
uses: docker/build-push-action@v4
45+
with:
46+
context: .
47+
file: ./docs/Dockerfile-deploy
48+
platforms: linux/amd64
49+
push: false
50+
# Only run when it is not a PR, build and push the image
3951
- name: Build and push
52+
if: github.event_name != 'pull_request'
4053
uses: docker/build-push-action@v4
4154
with:
4255
context: .
4356
file: ./docs/Dockerfile-deploy
4457
platforms: linux/amd64
45-
# Only push when not in PR
46-
push: ${{ github.event_name != 'pull_request' }}
47-
tags: ${{ github.event_name != 'pull_request' && 'eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest' || '' }}
58+
push: true
59+
tags: eosphorosai/dbgpt-docs:${{ github.ref_name }},eosphorosai/dbgpt-docs:latest

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
concurrency:
1111
group: ${{ github.event.number || github.run_id }}
12-
cancel-in-progress: true
12+
cancel-in-progress: false
1313

1414
jobs:
1515
build:

.github/workflows/test-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818

1919
concurrency:
2020
group: ${{ github.event.number || github.run_id }}
21-
cancel-in-progress: true
21+
cancel-in-progress: false
2222

2323
#permissions:
2424
# contents: read

0 commit comments

Comments
 (0)