Update resolved workspace dependencies #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Notify mochiOS | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: notify-mochios-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| notify: | |
| name: Trigger mochiOS build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Send repository dispatch | |
| env: | |
| MOCHIOS_BUILD_TOKEN: ${{ secrets.MOCHIOS_BUILD_TOKEN }} | |
| SOURCE_REPOSITORY: ${{ github.repository }} | |
| SOURCE_SHA: ${{ github.sha }} | |
| run: | | |
| set -euo pipefail | |
| if [ -z "${MOCHIOS_BUILD_TOKEN}" ]; then | |
| echo "MOCHIOS_BUILD_TOKEN is not configured" | |
| exit 1 | |
| fi | |
| curl \ | |
| --fail-with-body \ | |
| --silent \ | |
| --show-error \ | |
| --request POST \ | |
| --header "Accept: application/vnd.github+json" \ | |
| --header "Authorization: Bearer ${MOCHIOS_BUILD_TOKEN}" \ | |
| --header "X-GitHub-Api-Version: 2022-11-28" \ | |
| "https://api.github.com/repos/mochiOS/mochiOS/dispatches" \ | |
| --data @- <<EOF | |
| { | |
| "event_type": "dependency-updated", | |
| "client_payload": { | |
| "repository": "${SOURCE_REPOSITORY}", | |
| "sha": "${SOURCE_SHA}" | |
| } | |
| } | |
| EOF | |
| echo "Triggered mochiOS build" | |
| echo "Source repository: ${SOURCE_REPOSITORY}" | |
| echo "Source commit: ${SOURCE_SHA}" |