Skip to content

Commit d9dbaa2

Browse files
Trigger new CI runs on bot-generated commits (#123)
* Trigger CI runs on bot-generated commits * Align CI workflow triggers for consistency --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent 53e5ee7 commit d9dbaa2

File tree

7 files changed

+19
-40
lines changed

7 files changed

+19
-40
lines changed

.github/workflows/clang-format-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
5050
clang-format-check:
5151
needs: detect-clang-format-changes
52-
if: ${{ needs.detect-clang-format-changes.outputs.has_changes == 'true' }}
52+
if: ${{ (needs.detect-clang-format-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (env.ACT == 'true') }}
5353
runs-on: ubuntu-latest
5454
permissions:
5555
contents: read
@@ -69,7 +69,7 @@ jobs:
6969

7070
clang-format-check-skipped:
7171
needs: detect-clang-format-changes
72-
if: ${{ needs.detect-clang-format-changes.outputs.has_changes != 'true' }}
72+
if: ${{ (needs.detect-clang-format-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true') }}
7373
runs-on: ubuntu-latest
7474
permissions:
7575
contents: read

.github/workflows/clang-format-fix.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
path: phlex-src
4949
ref: ${{ needs.check.outputs.ref_name }}
5050
repository: ${{ needs.check.outputs.repo_name }}
51+
token: ${{ secrets.WORKFLOW_PAT }}
5152

5253
- uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20
5354
with:
@@ -59,6 +60,7 @@ jobs:
5960
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
6061
id: add_and_commit
6162
with:
63+
token: ${{ secrets.WORKFLOW_PAT }}
6264
cwd: phlex-src
6365
author_name: "github-actions[bot]"
6466
author_email: "41898282+github-actions[bot]@users.noreply.github.com"

.github/workflows/clang-tidy-check.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ jobs:
9494
needs: [ detect-clang-tidy-changes, check_comment_trigger ]
9595
if: |
9696
(github.event_name == 'pull_request' && needs.detect-clang-tidy-changes.outputs.has_changes == 'true') ||
97-
(github.event_name == 'issue_comment' && needs.check_comment_trigger.outputs.match_result == 'match' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'OWNER'))
97+
(github.event_name == 'issue_comment' && needs.check_comment_trigger.outputs.match_result == 'match' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'OWNER')) ||
98+
(github.event_name == 'workflow_dispatch') || (env.ACT == 'true')
9899
runs-on: ubuntu-24.04
99100

100101
container:
@@ -187,7 +188,7 @@ jobs:
187188

188189
clang-tidy-check-skipped:
189190
needs: detect-clang-tidy-changes
190-
if: github.event_name == 'pull_request' && needs.detect-clang-tidy-changes.outputs.has_changes != 'true'
191+
if: github.event_name == 'pull_request' && (needs.detect-clang-tidy-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true')
191192
runs-on: ubuntu-latest
192193
permissions:
193194
contents: read

.github/workflows/clang-tidy-fix.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
path: phlex-src
6565
ref: ${{ needs.check.outputs.ref_name }}
6666
repository: ${{ needs.check.outputs.repo_name }}
67+
token: ${{ secrets.WORKFLOW_PAT }}
6768

6869
- name: Setup build environment
6970
uses: Framework-R-D/phlex/.github/actions/setup-build-env@main
@@ -96,6 +97,7 @@ jobs:
9697
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
9798
id: add_and_commit
9899
with:
100+
token: ${{ secrets.WORKFLOW_PAT }}
99101
cwd: phlex-src
100102
author_name: "github-actions[bot]"
101103
author_email: "41898282+github-actions[bot]@users.noreply.github.com"

.github/workflows/cmake-format-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
5050
cmake-format-check:
5151
needs: detect-cmake-format-changes
52-
if: ${{ needs.detect-cmake-format-changes.outputs.has_changes == 'true' }}
52+
if: ${{ (needs.detect-cmake-format-changes.outputs.has_changes == 'true') || (github.event_name == 'workflow_dispatch') || (env.ACT == 'true') }}
5353
runs-on: ubuntu-latest
5454

5555
steps:
@@ -98,7 +98,7 @@ jobs:
9898
9999
cmake-format-check-skipped:
100100
needs: detect-cmake-format-changes
101-
if: ${{ needs.detect-cmake-format-changes.outputs.has_changes != 'true' }}
101+
if: ${{ (needs.detect-cmake-format-changes.outputs.has_changes != 'true') && (github.event_name != 'workflow_dispatch') && (env.ACT != 'true') }}
102102
runs-on: ubuntu-latest
103103

104104
steps:

.github/workflows/cmake-format-fix.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
path: phlex-src
5050
ref: ${{ needs.check.outputs.ref_name }}
5151
repository: ${{ needs.check.outputs.repo_name }}
52+
token: ${{ secrets.WORKFLOW_PAT }}
5253

5354
- name: Set up Python
5455
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
@@ -81,6 +82,7 @@ jobs:
8182
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
8283
id: add_and_commit
8384
with:
85+
token: ${{ secrets.WORKFLOW_PAT }}
8486
cwd: phlex-src
8587
author_name: "github-actions[bot]"
8688
author_email: "41898282+github-actions[bot]@users.noreply.github.com"

.github/workflows/coverage.yaml

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
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
@@ -40,25 +40,8 @@ jobs:
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

Comments
 (0)