Skip to content

Commit d2c921a

Browse files
chore(notification) Migrate deprecated rocket_chat webhook to google chat one
1 parent 8a48802 commit d2c921a

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Rocket chat notifications
1+
name: Google Chat notifications
22

3-
# Controls when the action will run.
3+
# Controls when the action will run.
44
on:
55
push:
66
tags:
@@ -11,13 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Get the tag short reference
15-
id: get_tag
16-
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
17-
18-
- name: Rocket.Chat Notification
19-
uses: madalozzo/Rocket.Chat.GitHub.Action.Notification@master
20-
with:
21-
type: success
22-
job_name: "[cleverage/process-bundle](https://github.com/cleverage/process-bundle) : ${{ steps.get_tag.outputs.TAG }} has been released"
23-
url: ${{ secrets.CLEVER_AGE_ROCKET_CHAT_WEBOOK_URL }}
14+
- name: Google Chat Notification
15+
env:
16+
WEBHOOK_URL: ${{ secrets.CLEVER_AGE_GOOGLE_CHAT_WEBHOOK_URL }}
17+
REPOSITORY: ${{ github.repository }}
18+
SERVER_URL: ${{ github.server_url }}
19+
TAG: ${{ github.ref_name }}
20+
run: |
21+
jq -n --arg text "<${SERVER_URL}/${REPOSITORY}|${REPOSITORY}> : <${SERVER_URL}/${REPOSITORY}/tree/${TAG}|${TAG}> has been released" '{text: $text}' \
22+
| curl --fail-with-body -sS -X POST -H 'Content-Type: application/json; charset=UTF-8' --data @- "$WEBHOOK_URL"

0 commit comments

Comments
 (0)