Skip to content

Commit

Permalink
Update Matrix and secrets (paritytech#14646)
Browse files Browse the repository at this point in the history
* WIP

* Fix usage of the s3krit/walking-tag-action action

* Fix notification jobs

* Fix notification content

---------

Co-authored-by: parity-processbot <>
  • Loading branch information
chevdor authored Jul 28, 2023
1 parent 868c416 commit f81f8eb
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 15 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/burnin-label-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ on:
jobs:
notify-devops:
runs-on: ubuntu-latest
strategy:
matrix:
channel:
- name: 'Team: DevOps'
room: '!lUslSijLMgNcEKcAiE:parity.io'

steps:
- name: Notify devops
if: github.event.label.name == 'A1-needsburnin'
uses: s3krit/matrix-message-action@v0.0.3
if: startsWith(github.event.label.name, 'A1-')
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
with:
room_id: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ROOM_ID }}
access_token: ${{ secrets.POLKADOT_DEVOPS_MATRIX_ACCESS_TOKEN }}
message: "@room Burn-in request received for [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})"
server: "matrix.parity.io"
room_id: ${{ matrix.channel.room }}
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
server: "m.parity.io"
message: |
@room Burn-in request received for [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
23 changes: 18 additions & 5 deletions .github/workflows/release-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ on:
jobs:
ping_matrix:
runs-on: ubuntu-latest
strategy:
matrix:
channel:
- name: 'General: Rust, Polkadot, Substrate'
room: '!aJymqQYtCjjqImFLSb:parity.io'
pre-release: false

steps:
- name: send message
uses: s3krit/matrix-message-action@v0.0.3
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
with:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: "**${{github.event.repository.full_name}}:** A release has been ${{github.event.action}}<br/>Release version [${{github.event.release.tag_name}}](${{github.event.release.html_url}})<br/><br/>***Description:***<br/>${{github.event.release.body}}<br/>"
server: "matrix.parity.io"
room_id: ${{ matrix.channel.room }}
access_token: ${{ secrets.RELEASENOTES_MATRIX_V2_ACCESS_TOKEN }}
server: "m.parity.io"
message: |
***${{github.event.repository.full_name}}:*** A release has been ${{github.event.action}}<br/>
Release version [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
-----
${{github.event.release.body}}<br/>
4 changes: 2 additions & 2 deletions .github/workflows/release-tagging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set Git tag
uses: s3krit/walking-tag-action@d04f7a53b72ceda4e20283736ce3627011275178 # latest version from master
with:
TAG_NAME: release
TAG_MESSAGE: Latest release
tag-name: release
tag-message: Latest release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion scripts/ci/common/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ structure_message() {
# access_token: see https://matrix.org/docs/guides/client-server-api/
# Usage: send_message $body (json formatted) $room_id $access_token
send_message() {
curl -XPOST -d "$1" "https://matrix.parity.io/_matrix/client/r0/rooms/$2/send/m.room.message?access_token=$3"
curl -XPOST -d "$1" "https://m.parity.io/_matrix/client/r0/rooms/$2/send/m.room.message?access_token=$3"
}

# Check for runtime changes between two commits. This is defined as any changes
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/gitlab/publish_draft_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ formatted_msg_body=$(cat <<EOF
Draft release created: $html_url
EOF
)
send_message "$(structure_message "$msg_body" "$formatted_msg_body")" "$MATRIX_ROOM_ID" "$MATRIX_ACCESS_TOKEN"
send_message "$(structure_message "$msg_body" "$formatted_msg_body")" "!aJymqQYtCjjqImFLSb:parity.io" "$RELEASENOTES_MATRIX_V2_ACCESS_TOKEN"

echo "[+] Done! Maybe the release worked..."

0 comments on commit f81f8eb

Please sign in to comment.