Skip to content

Commit

Permalink
release-test.yml: use s3krit's matrix action
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Feb 23, 2024
1 parent 7e6a464 commit 5c24939
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,22 @@ jobs:
id: generate_results
run: |
if [ "${{ steps.tests.conclusion }}" == "success" ]; then
nice_str="&#x2705; <strong>PASSED</strong>"
nice_str="&#x2705; **PASSED**"
elif [ "${{ steps.tests.conclusion }}" == "failure" ]; then
nice_str="&#x274C; <strong>FAILED</strong>"
nice_str="&#x274C; **FAILED**"
fi
echo "nice_str=${nice_str}" >> ${GITHUB_OUTPUT}
- name: Report to Matrix channel
if: ${{ always() && steps.generate_results.outputs.nice_str != '' }}
run: |
MESSAGE="${{ steps.generate_results.outputs.nice_str}}: Release tests" \
"[${{ matrix.pytest_mark }}, ${{ matrix.sudo }}] on '<em>${{ github.event_name }}</em>':" \
"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"; \
curl -H "Content-Type: application/json" -X POST \
--data '{"msgtype":"m.text","format":"org.matrix.custom.html","body":"${MESSAGE}","formatted_body":"${MESSAGE}"}' \
"https://matrix.org/_matrix/client/v3/rooms/${{env.RIOT_CI_RELEASE_REPORT_CHANNEL}}/send/m.room.message?access_token=${{secrets.MATRIX_RIOT_CI_ACCESS_TOKEN}}"
uses: s3krit/[email protected]
with:
server: "matrix.org"
room_id: ${{env.RIOT_CI_RELEASE_REPORT_CHANNEL}}
access_token: ${{secrets.MATRIX_RIOT_CI_ACCESS_TOKEN}}
message: >
${{ steps.generate_results.outputs.nice_str}}: Release tests
[${{ matrix.pytest_mark }}, ${{ matrix.sudo }}] on "*${{ github.event_name }}*":
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
- uses: actions/upload-artifact@v2
if: always()
with:
Expand Down

0 comments on commit 5c24939

Please sign in to comment.