File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ release :
3+ types :
4+ - published
5+ jobs :
6+ slack :
7+ runs-on : ubuntu-latest
8+ strategy :
9+ matrix :
10+ webhook : ${{ fromJSON(secrets.SLACK_WEBHOOKS) }}
11+ steps :
12+ - name : Get tag
13+ id : get_tag
14+ run : echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
15+ - name : Get version
16+ id : get_version
17+ run : echo ::set-output name=VERSION::${TAG##v}
18+ env :
19+ TAG : ${{ steps.get_tag.outputs.TAG }}
20+ - name : Prepare message
21+ id : get_message
22+ run : echo ::set-output name=MSG::"${{ secrets.SLACK_MESSAGE }}"
23+ env :
24+ VERSION : ${{ steps.get_version.outputs.VERSION }}
25+ TAG : ${{ steps.get_tag.outputs.TAG }}
26+ RELEASE_URL : " https://github.com/scaleway/terraform-provider-scaleway/releases/tag/${{ steps.get_tag.outputs.TAG }}"
27+ - name : Announce on slack
28+ id : announce_slack
29+ run : |
30+ curl -X POST -H 'Content-type: application/json' \
31+ --data '{
32+ "blocks": [
33+ {
34+ "type": "section",
35+ "text": {
36+ "type": "mrkdwn",
37+ "text": "'"${MESSAGE}"'"
38+ }
39+ }
40+ ]
41+ }' \
42+ ${WEBHOOK_URL}
43+ env :
44+ WEBHOOK_URL : ${{ matrix.webhook }}
45+ MESSAGE : ${{ steps.get_message.outputs.MSG }}
You can’t perform that action at this time.
0 commit comments