Skip to content

Commit e673230

Browse files
authored
Trigger cmsis-toolbox nightly after finishing devtools nightly (#2471)
## Changes - Trigger the CMSIS-Toolbox nightly workflow after the DevTools nightly completes. - The CMSIS-Toolbox nightly runs only when: - It's scheduled cron job triggers it, or - The DevTools workflow is manually executed with `build_toolbox=true`. ## Checklist <!-- Put an `x` in the boxes. All tasks must be completed and boxes checked before merging. --> - [x] 🤖 This change is covered by unit tests (if applicable). - [x] 🤹 Manual testing has been performed (if necessary). - [x] 🛡️ Security impacts have been considered (if relevant). - [x] 📖 Documentation updates are complete (if required). - [x] 🧠 Third-party dependencies and TPIP updated (if required).
1 parent 9cd16bf commit e673230

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: nightly
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
trigger_toolbox_build:
7+
description: 'Trigger cmsis-toolbox build as a part of this workflow'
8+
required: false
9+
default: false
10+
type: boolean
511
schedule:
612
- cron: '0 0 * * *'
713

@@ -111,3 +117,21 @@ jobs:
111117
commit: ${{ github.sha }}
112118
report_individual_runs: true
113119
files: "artifacts/**/*.xml"
120+
121+
# Triggers the cmsis-toolbox nightly workflow in the separate repository
122+
trigger-toolbox-nightly:
123+
needs: [ publish-test-results, coverage ]
124+
if: >-
125+
success() &&
126+
github.repository == 'Open-CMSIS-Pack/devtools' &&
127+
(github.event_name == 'schedule' || github.event.inputs.trigger_toolbox_build)
128+
runs-on: ubuntu-latest
129+
steps:
130+
- name: Trigger cmsis-toolbox Nightly
131+
run: |
132+
curl --fail-with-body --show-error --silent -X POST \
133+
-H "Authorization: Bearer ${{ secrets.CROSS_REPO_TOOLBOX_TOKEN }}" \
134+
-H "Accept: application/vnd.github+json" \
135+
-H "Content-Type: application/json" \
136+
https://api.github.com/repos/Open-CMSIS-Pack/cmsis-toolbox/actions/workflows/nightly.yml/dispatches \
137+
-d '{"ref":"main","inputs":{"trigger_extension_build":"true","use_nightly_devtools":"${{ github.event_name == 'schedule' && 'true' || 'false' }}"}}'

0 commit comments

Comments
 (0)