irc.yml 861 B

1234567891011121314151617181920212223242526
  1. name: irc
  2. on: [push]
  3. jobs:
  4. notification:
  5. runs-on: ubuntu-latest
  6. name: IRC notification
  7. steps:
  8. - name: Format message
  9. id: message
  10. # The commit message goes through the environment, not through shell
  11. # interpolation: a quote in a commit message used to break the script.
  12. env:
  13. ACTOR: ${{ github.actor }}
  14. COMMIT_MESSAGE: ${{ github.event.commits[0].message }}
  15. COMMIT_URL: ${{ github.event.commits[0].url }}
  16. run: |
  17. first_line=$(printf '%s\n' "$COMMIT_MESSAGE" | head -n 1)
  18. echo "message=$ACTOR pushed $first_line $COMMIT_URL" >> "$GITHUB_OUTPUT"
  19. - name: IRC notification
  20. uses: Gottox/irc-message-action@v2
  21. with:
  22. channel: '#modaudio'
  23. nickname: modaudio-bot
  24. message: ${{ steps.message.outputs.message }}