matrix-commit-message.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. on: [push]
  2. jobs:
  3. send-message:
  4. runs-on: ubuntu-latest
  5. name: Send message via Matrix
  6. steps:
  7. - run: |
  8. for i in ${{ join(github.event.commits.*.id, ' ') }}; do
  9. echo "::set-output name=COMMIT_MESSAGE::$i"
  10. done
  11. id: commit-message
  12. - uses: narodnik/matrix-action@main
  13. with:
  14. server: 'matrix.dark.fi'
  15. room-id: '!MODZOZydPqCRdulXmR:dark.fi'
  16. #access_token: ${{ secrets.MATRIX_TOKEN }}
  17. status: 'OK'
  18. user: 'narodnik'
  19. password: ${{ secrets.MATRIX_PASSWORD }}
  20. message: The selected <b>color</b> is <i>${{ steps.commit-message.outputs.COMMIT_MESSAGE }}</i>
  21. #- name: Send message to test channel
  22. # id: matrix-chat-message
  23. # uses: fadenb/matrix-chat-message@v0.0.6
  24. # with:
  25. # homeserver: 'dark.fi'
  26. # token: ${{ secrets.MATRIX_TOKEN }}
  27. # channel: '!MODZOZydPqCRdulXmR:dark.fi'
  28. # message: |
  29. # This is an *example message* using **markdown** for formatting.\
  30. # Use a `\` character at the end of a line to cause a linebreak (the whole message is treated as markdown).\
  31. # You can use variables like ${{ github.sha }} anywhere.