@@ -45,30 +45,14 @@ jobs:
4545          push : true 
4646          tags : huggingface/trl-latest-gpu 
4747
48-       - name : Post to a Slack channel 
49-         id : slack 
50- 51-         uses : slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 
48+       - name : Post to Slack 
49+         if : always() 
50+         uses : huggingface/hf-workflows/.github/actions/post-slack@main 
5251        with :
53-           #  Slack channel id, channel name, or user id to post message.
54-           #  See also: https://api.slack.com/methods/chat.postMessage#channels
55-           channel-id : ${{ env.CI_SLACK_CHANNEL }} 
56-           #  For posting a rich message using Block Kit
57-           payload : | 
58-             { 
59-               "text": "trl-latest-gpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", 
60-               "blocks": [ 
61-                 { 
62-                   "type": "section", 
63-                   "text": { 
64-                     "type": "mrkdwn", 
65-                     "text": "trl-latest-gpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" 
66-                   } 
67-                 } 
68-               ] 
69-             } 
70- env :
71-           SLACK_BOT_TOKEN : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} 
52+           slack_channel : ${{ env.CI_SLACK_CHANNEL }} 
53+           title : 🤗 Results of the trl-latest-gpu Docker Image build 
54+           status : ${{ job.status }} 
55+           slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} 
7256
7357  trl-source :
7458    name : " Latest TRL + HF ecosystem from source" 
@@ -101,27 +85,11 @@ jobs:
10185          push : true 
10286          tags : huggingface/trl-source-gpu 
10387
104-       - name : Post to a Slack channel 
105-         id : slack 
106- 107-         uses : slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 
88+       - name : Post to Slack 
89+         if : always() 
90+         uses : huggingface/hf-workflows/.github/actions/post-slack@main 
10891        with :
109-           #  Slack channel id, channel name, or user id to post message.
110-           #  See also: https://api.slack.com/methods/chat.postMessage#channels
111-           channel-id : ${{ env.CI_SLACK_CHANNEL }} 
112-           #  For posting a rich message using Block Kit
113-           payload : | 
114-             { 
115-               "text": "trl-source-gpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}", 
116-               "blocks": [ 
117-                 { 
118-                   "type": "section", 
119-                   "text": { 
120-                     "type": "mrkdwn", 
121-                     "text": "trl-source-gpu Docker Image build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" 
122-                   } 
123-                 } 
124-               ] 
125-             } 
126- env :
127-           SLACK_BOT_TOKEN : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} 
92+           slack_channel : ${{ env.CI_SLACK_CHANNEL }} 
93+           title : 🤗 Results of the trl-source-gpu Docker Image build 
94+           status : ${{ job.status }} 
95+           slack_token : ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}   
0 commit comments