Skip to content

Commit 3803272

Browse files
committed
improve GHA triggers
1 parent f8c2b28 commit 3803272

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

.github/workflows/build-docker.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@ name: Build and Publish Docker Images
22

33
on:
44
push:
5+
branches:
6+
- main
57
paths:
68
- 'docker/**'
79
- '.github/workflows/build-docker.yml'
8-
branches:
9-
- main
1010
workflow_dispatch:
11+
workflow_run:
12+
workflows: ["Bump Version, Build and Publish Python"]
13+
types:
14+
- completed
1115

1216
jobs:
1317
build:
1418
runs-on: ubuntu-latest
15-
19+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
1620
steps:
1721
- name: Checkout code
1822
uses: actions/checkout@v3

.github/workflows/build-docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ on:
1010
- 'mkdocs.yml'
1111
- '.github/workflows/build-docs.yml'
1212
workflow_dispatch:
13+
workflow_run:
14+
workflows: ["Bump Version, Build and Publish Python"]
15+
types:
16+
- completed
1317

1418
jobs:
1519
generate_and_publish_docs:
20+
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
1621
permissions:
1722
contents: write
1823
pages: write

.github/workflows/build-python.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -72,28 +72,6 @@ jobs:
7272
uv build
7373
uv publish
7474
75-
- name: Dispatch Docs Workflow
76-
uses: actions/github-script@v6
77-
with:
78-
script: |
79-
github.rest.actions.createWorkflowDispatch({
80-
owner: context.repo.owner,
81-
repo: context.repo.repo,
82-
workflow_id: 'build-docs.yml',
83-
ref: context.ref
84-
})
85-
86-
- name: Dispatch Docker Workflow
87-
uses: actions/github-script@v6
88-
with:
89-
script: |
90-
github.rest.actions.createWorkflowDispatch({
91-
owner: context.repo.owner,
92-
repo: context.repo.repo,
93-
workflow_id: 'build-docker.yml',
94-
ref: context.ref
95-
})
96-
9775
- name: Get previous version tag
9876
id: get_previous_version_tag
9977
run: |

0 commit comments

Comments
 (0)