matrix-commit-message.yml 1.3 KB

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