File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 7979 if : ${{ steps.email.outputs.ok }}
8080 run : |
8181 SLACK_USER_ID=$(echo '${{ steps.email.outputs.response }}' | jq -r '.user.id')
82- echo "SLACK_USER_ID=$SLACK_USER_ID" >> $GITHUB_ENV
82+ echo "SLACK_USER_ID=$SLACK_USER_ID" >> $GITHUB_ENV
83+
84+ - name : Send a direct message
85+ if : ${{ steps.email.outputs.ok }}
86+ 87+ with :
88+ errors : true
89+ method : chat.postMessage # https://api.slack.com/methods/chat.postMessage
90+ token : ${{ secrets.SLACK_BOT_TOKEN }}
91+ payload : |
92+ "channel": "${{ env.SLACK_USER_ID }}",
93+ "text": "${{ github.repository }} had a change!",
94+ "blocks": [
95+ {
96+ "type": "section",
97+ "text": {
98+ "type": "mrkdwn",
99+ "text": ":large_green_square: <https://github.com/${{ github.repository }}|*${{ github.repository }}*>: `${{ github.sha }}`"
100+ }
101+ },
102+ {
103+ "type": "section",
104+ "text": {
105+ "type": "mrkdwn",
106+ "text": ${{ toJSON(github.event.head_commit.message) }}
107+ }
108+ }
109+ ]
110+
You can’t perform that action at this time.
0 commit comments