3030 packages : read
3131
3232 outputs :
33- has_changes : ${{ steps.act_force.outputs.matched == 'true' && 'true' || steps. filter.outputs.matched }}
34- changed_files : ${{ steps.act_force.outputs.matched == 'true' && steps.act_force.outputs.matched_files || steps. filter.outputs.matched_files }}
33+ has_changes : ${{ steps.filter.outputs.matched }}
34+ changed_files : ${{ steps.filter.outputs.matched_files }}
3535
3636 steps :
3737 - name : Check out source code
4040 fetch-depth : 0
4141 path : phlex-src
4242
43- - name : Detect act environment
44- id : detect_act
45- run : |
46- if [ "${GITHUB_ACTOR}" = "nektos/act" ] || [ "${ACT:-}" = "true" ] || [ "${ACT:-}" = "1" ]; then
47- echo "is_act=true" >> "$GITHUB_OUTPUT"
48- else
49- echo "is_act=false" >> "$GITHUB_OUTPUT"
50- fi
51-
52- - name : Force coverage execution when running under act
53- id : act_force
54- if : ${{ steps.detect_act.outputs.is_act == 'true' }}
55- run : |
56- echo "matched=true" >> "$GITHUB_OUTPUT"
57- echo "matched_files=act-run: forced coverage execution" >> "$GITHUB_OUTPUT"
58-
5943 - name : Detect coverage relevant changes
6044 id : filter
61- if : ${{ steps.detect_act.outputs.is_act != 'true' }}
6245 uses : Framework-R-D/phlex/.github/actions/detect-relevant-changes@main
6346 with :
6447 repo-path : phlex-src
@@ -69,29 +52,18 @@ jobs:
6952 cmake
7053
7154 - name : Report detection outcome
72- env :
73- IS_ACT : ${{ steps.detect_act.outputs.is_act }}
74- ACT_MATCHED : ${{ steps.act_force.outputs.matched }}
75- ACT_FILES : ${{ steps.act_force.outputs.matched_files }}
76- FILTER_MATCHED : ${{ steps.filter.outputs.matched }}
77- FILTER_FILES : ${{ steps.filter.outputs.matched_files }}
7855 run : |
79- if [ "${IS_ACT}" = "true" ]; then
80- echo "::notice::Running under act; forcing coverage workflow to execute."
81- if [ -n "${ACT_FILES}" ]; then
82- printf '%s\n' "${ACT_FILES}"
83- fi
84- elif [ "${FILTER_MATCHED}" != "true" ]; then
56+ if [ "${{ steps.filter.outputs.matched }}" != "true" ]; then
8557 echo "::notice::No coverage relevant changes detected; workflow will be skipped."
8658 else
8759 echo "::group::Coverage relevant files"
88- printf '%s\n' "${FILTER_FILES }"
60+ printf '%s\n' "${{ steps.filter.outputs.matched_files } }"
8961 echo "::endgroup::"
9062 fi
9163
9264 coverage :
9365 needs : detect-coverage-changes
94- if : ${{ needs.detect-coverage-changes.outputs.has_changes == 'true' }}
66+ if : ${{ ( needs.detect-coverage-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (env.ACT == 'true') }}
9567 runs-on : ubuntu-24.04
9668
9769 container :
@@ -366,7 +338,7 @@ jobs:
366338
367339 coverage-skipped :
368340 needs : detect-coverage-changes
369- if : ${{ needs.detect-coverage-changes.outputs.has_changes != 'true' }}
341+ if : ${{ ( needs.detect-coverage-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true') }}
370342 runs-on : ubuntu-latest
371343 permissions :
372344 contents : read
0 commit comments