Skip to content

Commit

Permalink
improve GHA triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
blairhudson committed Jan 21, 2025
1 parent f8c2b28 commit 3803272
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@ name: Build and Publish Docker Images

on:
push:
branches:
- main
paths:
- 'docker/**'
- '.github/workflows/build-docker.yml'
branches:
- main
workflow_dispatch:
workflow_run:
workflows: ["Bump Version, Build and Publish Python"]
types:
- completed

jobs:
build:
runs-on: ubuntu-latest

if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ on:
- 'mkdocs.yml'
- '.github/workflows/build-docs.yml'
workflow_dispatch:
workflow_run:
workflows: ["Bump Version, Build and Publish Python"]
types:
- completed

jobs:
generate_and_publish_docs:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: write
pages: write
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,6 @@ jobs:
uv build
uv publish
- name: Dispatch Docs Workflow
uses: actions/github-script@v6
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build-docs.yml',
ref: context.ref
})
- name: Dispatch Docker Workflow
uses: actions/github-script@v6
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build-docker.yml',
ref: context.ref
})
- name: Get previous version tag
id: get_previous_version_tag
run: |
Expand Down

0 comments on commit 3803272

Please sign in to comment.