Skip to content

Using fromJSON

Using fromJSON #42

Workflow file for this run

name: Notify IRC
on:
push:
branches:
- main # Or your desired branch
jobs:
notify-irc:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set execute permissions
run: chmod +x .github/workflows/notify-irc.sh
- name: Generate notification message
id: notify
run: |
.github/workflows/notify-irc.sh "$COMMITS_JSON" "$GITHUB_ACTOR" "$GITHUB_REF_NAME" "$GITHUB_COMPARE_URL"
- name: Encode Message as JSON
id: encode-message
run: |
MULTILINE_MESSAGE="Testing line one\nTest line two"
ENCODED_MESSAGE=$(echo "$MULTILINE_MESSAGE" | jq -R .)
echo "message=$ENCODED_MESSAGE" >> $GITHUB_OUTPUT
- name: Notify IRC
uses: rectalogic/notify-irc@v1
with:
channel: "#OpenZFS-Windows"
server: "irc.libera.chat"
nickname: "zfs-consus"
message: ${{ fromJSON(steps.encode-message.outputs.message) }}