Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/urcomputeringpal/osc-action
Send Open Sound Control messages as a part of GitHub Actions workflows. Because software development needs beeps and bloops.
https://github.com/urcomputeringpal/osc-action
actions github-actions osc sonic-pi
Last synced: 18 days ago
JSON representation
Send Open Sound Control messages as a part of GitHub Actions workflows. Because software development needs beeps and bloops.
- Host: GitHub
- URL: https://github.com/urcomputeringpal/osc-action
- Owner: urcomputeringpal
- License: mit
- Created: 2020-05-19T15:48:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-12T01:53:43.000Z (over 1 year ago)
- Last Synced: 2024-12-10T08:56:17.195Z (about 1 month ago)
- Topics: actions, github-actions, osc, sonic-pi
- Language: JavaScript
- Homepage:
- Size: 1.07 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# osc-action
Send Open Sound Control messages as a part of GitHub Actions workflows. Because software development needs beeps and bloops.
```yaml
- uses: urcomputeringpal/osc-action@master
with:
host: localhost
port: 51235
endpoint: /run-code
separator: "|"
message: ACTIONS|play 60
```Pairs nicely with [Sonic Pi](https://sonic-pi.net) and [GitHub Actions Self-hosted runners](https://help.github.com/en/actions/hosting-your-own-runners).
# Example
The following workflow will run the contents of `sonic-pi.rb` in your repository in your copy of Sonic Pi every time it is pushed to the `master` branch:
```yaml
name: live
on:
push:
branches:
- masterjobs:
run-code:
runs-on: self-hosted
steps:
- uses: actions/checkout@v1
- id: contents
run: |
# Escape newlines
escapeData() {
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
$'\r') printf "%%0D";;
$'\n') printf "%%0A";;
*) printf "$c" ;;
esac
done
LC_COLLATE=$old_lc_collate
}
echo "::set-output name=file::$(escapeData "$(cat sonic-pi.rb)")"
- uses: urcomputeringpal/osc-action@master
with:
host: localhost
#
port: 51235
endpoint: /run-code
separator: "|"
message: ACTIONS|${{ steps.contents.outputs.file }}
```