Microsoft Azure IoT Hub - C2D Action
This action allows you to send a Cloud-to-Device message as part of your Github Actions CI/CD workflow.
Basic Usage
- name: Publish Action C2D Message
uses: dcparsons/azure-iot-action@v1.0.2
with
iot-hub-connection-string: <iot hub connection string>
device-id: <device id>
message: <message>
Parameters
- iot-hub-connection-string - this should be the connection string to the IOT Hub that you setup in Microsoft Azure.
- device-id - the id of the device you want to send a message to
- message - the message you want to send to the device
Leveraging Secrets
Your IoT connection string is going to contain a shared access key which will grant anyone with the connection string access to your IoT Hub. If you are going to use this action in your CI/CD workflow I would highly suggest using GitHub Secrets to store that data. You can also choose to add your device-id as a secret…