From 20209ffe0e300d2f16461ae5889afab3adce0e4a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 20:14:13 +0000 Subject: [PATCH 1/2] Initial plan From a4dc5c010418c0cbb4015339ce205d007062870d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 20:20:41 +0000 Subject: [PATCH 2/2] fix: wire workflow_call inputs, act fallback for change detection, and clang-tidy/format-all failures Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com> --- .github/actions/workflow-setup/action.yaml | 15 +++++++++++++-- .github/workflows/actionlint-check.yaml | 4 ++++ .github/workflows/clang-tidy-check.yaml | 1 + .github/workflows/cmake-format-check.yaml | 4 ++++ .github/workflows/format-all.yaml | 6 ++++++ .github/workflows/header-guards-check.yaml | 4 ++++ .github/workflows/jsonnet-format-check.yaml | 4 ++++ .github/workflows/markdown-check.yaml | 4 ++++ .github/workflows/python-check.yaml | 4 ++++ 9 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/actions/workflow-setup/action.yaml b/.github/actions/workflow-setup/action.yaml index 89a27321..a72de8d0 100644 --- a/.github/actions/workflow-setup/action.yaml +++ b/.github/actions/workflow-setup/action.yaml @@ -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" @@ -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 }} @@ -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" + fi diff --git a/.github/workflows/actionlint-check.yaml b/.github/workflows/actionlint-check.yaml index 52742693..4236c799 100644 --- a/.github/workflows/actionlint-check.yaml +++ b/.github/workflows/actionlint-check.yaml @@ -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 diff --git a/.github/workflows/clang-tidy-check.yaml b/.github/workflows/clang-tidy-check.yaml index 74eeb4ea..921a5c01 100644 --- a/.github/workflows/clang-tidy-check.yaml +++ b/.github/workflows/clang-tidy-check.yaml @@ -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" + exit 1 else echo "✅ clang-tidy check passed" fi diff --git a/.github/workflows/cmake-format-check.yaml b/.github/workflows/cmake-format-check.yaml index 190e803d..8a7eb5ed 100644 --- a/.github/workflows/cmake-format-check.yaml +++ b/.github/workflows/cmake-format-check.yaml @@ -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 diff --git a/.github/workflows/format-all.yaml b/.github/workflows/format-all.yaml index 71445f18..c166d5e0 100644 --- a/.github/workflows/format-all.yaml +++ b/.github/workflows/format-all.yaml @@ -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 diff --git a/.github/workflows/header-guards-check.yaml b/.github/workflows/header-guards-check.yaml index 24f695df..42bd4762 100644 --- a/.github/workflows/header-guards-check.yaml +++ b/.github/workflows/header-guards-check.yaml @@ -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 diff --git a/.github/workflows/jsonnet-format-check.yaml b/.github/workflows/jsonnet-format-check.yaml index ffed5e07..476c5350 100644 --- a/.github/workflows/jsonnet-format-check.yaml +++ b/.github/workflows/jsonnet-format-check.yaml @@ -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 diff --git a/.github/workflows/markdown-check.yaml b/.github/workflows/markdown-check.yaml index 1102fd5f..1968e927 100644 --- a/.github/workflows/markdown-check.yaml +++ b/.github/workflows/markdown-check.yaml @@ -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 diff --git a/.github/workflows/python-check.yaml b/.github/workflows/python-check.yaml index e5bb900f..d4eda96b 100644 --- a/.github/workflows/python-check.yaml +++ b/.github/workflows/python-check.yaml @@ -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