The official ActivitySmith Github Action. Send push notifications and start, update or end Live Activities directly from your workflows.
action(required):send_push_notification,start_live_activity,update_live_activity,end_live_activityapi-key(required): ActivitySmith API keyerrors(optional, defaultfalse): fail the step on error whentruelive-activity-id(required for update/end): Live Activity IDpayload(optional): JSON or YAML string payloadpayload-delimiter(optional): delimiter used to flatten nested payload valuespayload-file-path(optional): path to a JSON/YAML payload file
ok:truewhen the request succeededresponse: JSON stringified API response (or error response)time: Unix epoch time (seconds) when the step finishedlive_activity_id: Live Activity ID returned fromstart_live_activity
Full workflow format using the same examples as below:
name: ActivitySmith Demo
on:
workflow_dispatch:
jobs:
activitysmith_demo:
runs-on: ubuntu-latest
steps:
- name: Start live activity
id: start_activity
uses: ActivitySmithHQ/activitysmith-github-action@v0.1.0
with:
action: start_live_activity
api-key: ${{ secrets.ACTIVITYSMITH_API_KEY }}
payload: |
content_state:
title: "ActivitySmith API Deployment"
subtitle: "ci: install & build"
number_of_steps: 3
current_step: 1
type: "segmented_progress"
color: "green"
- name: Update live activity
uses: ActivitySmithHQ/activitysmith-github-action@v0.1.0
with:
action: update_live_activity
api-key: ${{ secrets.ACTIVITYSMITH_API_KEY }}
live-activity-id: ${{ steps.start_activity.outputs.live_activity_id }}
payload-file-path: ./activitysmith/payloads/update.yml
- name: End live activity
uses: ActivitySmithHQ/activitysmith-github-action@v0.1.0
with:
action: end_live_activity
api-key: ${{ secrets.ACTIVITYSMITH_API_KEY }}
live-activity-id: ${{ steps.start_activity.outputs.live_activity_id }}
payload: |
content_state:
title: "ActivitySmith API Deployment"
subtitle: "done"
current_step: 3
- name: Send push notification
uses: ActivitySmithHQ/activitysmith-github-action@v0.1.0
with:
action: send_push_notification
api-key: ${{ secrets.ACTIVITYSMITH_API_KEY }}
payload: |
title: "ActivitySmith Deployment"
message: "New release deployed to production!"payloadsupports JSON or YAML.payload-file-pathsupports.json,.yml, or.yaml.- Live Activity payloads must include
content_state(snake_case). - Required fields for
start_live_activitycontent_state:title,number_of_steps,current_step,type. - Required fields for
update_live_activity/end_live_activitycontent_state:title,current_step(number_of_steps optional). - For update/end,
live-activity-idis required. The action will setactivity_idin the request body.