From d203cc267b5af166e0ba5543a187c9c9e4bd416a Mon Sep 17 00:00:00 2001 From: sentriz Date: Mon, 25 Sep 2023 19:24:55 +0100 Subject: [PATCH] escape special chars in commit messages via pipe --- .github/workflows/notify-irc.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/notify-irc.yaml b/.github/workflows/notify-irc.yaml index 2ccf27b..44ccba7 100644 --- a/.github/workflows/notify-irc.yaml +++ b/.github/workflows/notify-irc.yaml @@ -5,9 +5,13 @@ on: - master jobs: notify: - name: Send request + name: Checkout and notify runs-on: ubuntu-latest steps: - - run: | - curl "${{ secrets.IRC_NOTIFY_URL }}" -F target=#gonic -F 'message=push to master (@${{ github.event.head_commit.author.username }}) ${{ github.event.head_commit.message }}' >/dev/null 2>&1 + - name: Checkout repository + uses: actions/checkout@v3 + - name: Notify + run: | + set +x e + git log -1 --pretty="push to master (@%an) %s" | curl "${{ secrets.IRC_NOTIFY_URL }}" -F target=#gonic -F message=@- >/dev/null 2>&1 exit 0