Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,33 @@ jobs:
path: coverage.xml

# ---------------------------------------------------------------
# Job 2 — Build Docker images (only when Docker files change)
# Job 0 — Detect whether Docker-relevant files changed
# ---------------------------------------------------------------
changes:
runs-on: ubuntu-latest
outputs:
docker: ${{ steps.filter.outputs.docker }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docker:
- 'docker/**'
- 'pyproject.toml'
- 'uv.lock'
- 'requirements.txt'
- '.github/workflows/ci.yml'

# ---------------------------------------------------------------
# Job 2 — Build Docker images (only when Docker-relevant files change)
# ---------------------------------------------------------------
docker-build:
runs-on: ubuntu-latest
needs: lint-and-test
needs: [lint-and-test, changes]
if: >
github.event_name == 'pull_request' ||
needs.changes.outputs.docker == 'true' ||
Comment on lines 82 to +86
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because ci.yml is called from deploy.yml via workflow_call on version tags, this new changes/docker-build gating will also be evaluated during CD. If Docker builds are meant to be PR-only (as the PR description suggests), consider guarding these jobs with if: github.event_name == 'pull_request' or adding a workflow input to disable docker builds for CD invocations.

Copilot uses AI. Check for mistakes.
contains(github.event.head_commit.message, '[docker]')
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github.event.head_commit.message isn't available for this workflow's triggers (pull_request and workflow_call). With the new condition, Python-only PRs will evaluate contains(github.event.head_commit.message, '[docker]') and the expression can error or never match, so the job gating won't work as intended. Consider switching the override to PR metadata (e.g., github.event.pull_request.title/body) or guarding/null-coalescing the value (e.g., contains(github.event.head_commit.message || '', '[docker]')) and/or computing a force_docker output in the changes job from git log -1.

Suggested change
contains(github.event.head_commit.message, '[docker]')
contains(github.event.head_commit.message || '', '[docker]')

Copilot uses AI. Check for mistakes.

steps:
Expand Down
Loading