@@ -21,12 +21,15 @@ jobs:
2121 name : Compile Arduino Opta Controller
2222 permissions :
2323 contents : read
24+ issues : write
2425
2526 steps :
2627 - name : Checkout repository
2728 uses : actions/checkout@v4
2829
2930 - name : Compile Arduino Opta sketch
31+ id : compile-opta
32+ continue-on-error : true
3033 uses : arduino/compile-sketches@v1
3134 with :
3235 fqbn : ' arduino:mbed_opta:opta'
@@ -49,18 +52,52 @@ jobs:
4952 name : opta-controller-report
5053 path : sketches-reports
5154 retention-days : 30
55+
56+ - name : Create issue on compilation failure
57+ if : failure() && steps.compile-opta.outcome == 'failure'
58+ uses : actions/github-script@v7
59+ with :
60+ script : |
61+ const issue = await github.rest.issues.create({
62+ owner: context.repo.owner,
63+ repo: context.repo.repo,
64+ title: '🔴 Arduino Opta Controller compilation failed',
65+ body: `## Compilation Error
66+
67+ The Arduino Opta Controller sketch failed to compile.
68+
69+ **Workflow Run:** [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
70+ **Commit:** ${{ github.sha }}
71+ **Branch:** ${{ github.ref_name }}
72+
73+ ### Details
74+ - **Sketch:** \`LifeTrac-v25/arduino_opta_controller\`
75+ - **Board:** \`arduino:mbed_opta:opta\`
76+ - **Triggered by:** ${{ github.event_name }}
77+
78+ Please review the workflow logs to identify and fix the compilation errors.
79+
80+ ---
81+ *This issue was automatically created by the Arduino CI workflow.*`,
82+ labels: ['bug', 'arduino', 'ci'],
83+ assignees: ['Copilot']
84+ });
85+ console.log(`Created issue #${issue.data.number}`)
5286
5387 compile-esp32-remote :
5488 runs-on : ubuntu-latest
5589 name : Compile ESP32 Remote Control
5690 permissions :
5791 contents : read
92+ issues : write
5893
5994 steps :
6095 - name : Checkout repository
6196 uses : actions/checkout@v4
6297
6398 - name : Compile ESP32 sketch
99+ id : compile-esp32
100+ continue-on-error : true
64101 uses : arduino/compile-sketches@v1
65102 with :
66103 fqbn : ' esp32:esp32:esp32thing_plus'
@@ -83,3 +120,34 @@ jobs:
83120 name : esp32-remote-report
84121 path : sketches-reports
85122 retention-days : 30
123+
124+ - name : Create issue on compilation failure
125+ if : failure() && steps.compile-esp32.outcome == 'failure'
126+ uses : actions/github-script@v7
127+ with :
128+ script : |
129+ const issue = await github.rest.issues.create({
130+ owner: context.repo.owner,
131+ repo: context.repo.repo,
132+ title: '🔴 ESP32 Remote Control compilation failed',
133+ body: `## Compilation Error
134+
135+ The ESP32 Remote Control sketch failed to compile.
136+
137+ **Workflow Run:** [#${{ github.run_number }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
138+ **Commit:** ${{ github.sha }}
139+ **Branch:** ${{ github.ref_name }}
140+
141+ ### Details
142+ - **Sketch:** \`LifeTrac-v25/esp32_remote_control\`
143+ - **Board:** \`esp32:esp32:esp32thing_plus\`
144+ - **Triggered by:** ${{ github.event_name }}
145+
146+ Please review the workflow logs to identify and fix the compilation errors.
147+
148+ ---
149+ *This issue was automatically created by the Arduino CI workflow.*`,
150+ labels: ['bug', 'arduino', 'ci'],
151+ assignees: ['Copilot']
152+ });
153+ console.log(`Created issue #${issue.data.number}`)
0 commit comments