Skip to content
Merged
Show file tree
Hide file tree
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
15 changes: 13 additions & 2 deletions .github/actions/workflow-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ outputs:
value: ${{ steps.prepare.outputs.build_path }}
has_changes:
description: "Whether relevant changes were detected"
value: ${{ steps.detect.outputs.has_changes }}
value: ${{ steps.changes.outputs.has_changes }}

runs:
using: "composite"
Expand Down Expand Up @@ -112,7 +112,7 @@ runs:

- name: Run change detection
id: detect
if: inputs.file-type != '' || inputs.include-globs != ''
if: (inputs.file-type != '' || inputs.include-globs != '') && steps.prepare.outputs.is_act != 'true'
uses: Framework-R-D/phlex/.github/actions/run-change-detection@main
with:
checkout-path: ${{ steps.prepare.outputs.checkout_path }}
Expand All @@ -123,3 +123,14 @@ runs:
include-globs: ${{ inputs.include-globs }}
exclude-globs: ${{ inputs.exclude-globs }}
head-ref: ${{ inputs.head-ref }}

- name: Set has_changes output
id: changes
shell: bash
run: |
if [ "${{ steps.prepare.outputs.is_act }}" = "true" ] && \
([ "${{ inputs.file-type }}" != "" ] || [ "${{ inputs.include-globs }}" != "" ]); then
echo "has_changes=true" >> "$GITHUB_OUTPUT"
else
echo "has_changes=${{ steps.detect.outputs.has_changes }}" >> "$GITHUB_OUTPUT"
Comment on lines +134 to +135
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

Set has_changes output can write an empty has_changes= when change detection is not run (e.g., file-type and include-globs are both empty so steps.detect is skipped). For consistency (and to keep the output strictly boolean-like), consider explicitly emitting has_changes=false in that case (while keeping the act override behavior).

Suggested change
else
echo "has_changes=${{ steps.detect.outputs.has_changes }}" >> "$GITHUB_OUTPUT"
elif [ "${{ steps.detect.outputs.has_changes }}" != "" ]; then
echo "has_changes=${{ steps.detect.outputs.has_changes }}" >> "$GITHUB_OUTPUT"
else
echo "has_changes=false" >> "$GITHUB_OUTPUT"

Copilot uses AI. Check for mistakes.
fi
4 changes: 4 additions & 0 deletions .github/workflows/actionlint-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ jobs:
.github/actions/**/*.yml
.github/actions/**/*.yaml
head-ref: ${{ inputs.pr-head-sha }}
ref: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
pr-base-sha: ${{ inputs.pr-base-sha }}
checkout-path: ${{ inputs.checkout-path }}

actionlint-check:
needs: setup
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clang-tidy-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
exit 1
elif grep -qE '^/.+\.(cpp|hpp|c|h):[0-9]+:[0-9]+: (warning|error):' clang-tidy.log; then
echo "::warning::Clang-tidy found issues in the code"
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

This branch emits a workflow command as ::warning::... but then exits non-zero, which fails the job. Consider switching this to ::error::... (or keeping warning but not failing) so the log annotation severity matches the job outcome.

Suggested change
echo "::warning::Clang-tidy found issues in the code"
echo "::error::Clang-tidy found issues in the code"

Copilot uses AI. Check for mistakes.
exit 1
else
echo "✅ clang-tidy check passed"
fi
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/cmake-format-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
with:
file-type: cmake
head-ref: ${{ inputs.pr-head-sha }}
ref: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
pr-base-sha: ${{ inputs.pr-base-sha }}
checkout-path: ${{ inputs.checkout-path }}

cmake-format-check:
needs: setup
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/format-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,9 @@ jobs:
uses: Framework-R-D/phlex/.github/actions/complete-pr-comment@main
with:
status: ${{ steps.collect.outputs.has_failures == 'true' && 'failure' || 'success' }}

- name: Fail on formatter failures
if: steps.collect.outputs.has_failures == 'true'
run: |
echo "One or more formatters failed, were canceled, or were skipped."
exit 1
4 changes: 4 additions & 0 deletions .github/workflows/header-guards-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
with:
file-type: cpp
head-ref: ${{ inputs.pr-head-sha }}
ref: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
pr-base-sha: ${{ inputs.pr-base-sha }}
checkout-path: ${{ inputs.checkout-path }}

header-guards-check:
needs: setup
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/jsonnet-format-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
with:
file-type: jsonnet
head-ref: ${{ inputs.pr-head-sha }}
ref: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
pr-base-sha: ${{ inputs.pr-base-sha }}
checkout-path: ${{ inputs.checkout-path }}

jsonnet-format-check:
needs: setup
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/markdown-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
with:
file-type: md
head-ref: ${{ inputs.pr-head-sha }}
ref: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
pr-base-sha: ${{ inputs.pr-base-sha }}
checkout-path: ${{ inputs.checkout-path }}

markdown-check:
needs: setup
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/python-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
with:
file-type: python
head-ref: ${{ inputs.pr-head-sha }}
ref: ${{ inputs.ref }}
repo: ${{ inputs.repo }}
pr-base-sha: ${{ inputs.pr-base-sha }}
checkout-path: ${{ inputs.checkout-path }}

python-check:
needs: setup
Expand Down
Loading