@@ -45,17 +45,40 @@ jobs:
45
45
docker-compose down
46
46
sudo rm -rf /tmp/nginx
47
47
echo "y" | docker image prune -a
48
- - name : Slack Notification
49
- uses : rtCamp/action-slack-notify@v2
48
+ - name : Create ENV
50
49
env :
51
- SLACK_CHANNEL : github_action_status
52
- SLACK_COLOR : ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
53
- SLACK_ICON : https://github.com/rtCamp.png?size=48
54
- SLACK_MESSAGE : ' Post Content Nginx PHP ${{ matrix.pv }} AMD64 :rocket:'
55
- SLACK_TITLE : Post Title
56
- SLACK_USERNAME : rtCamp
57
- SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
58
- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
50
+ ENV_TEST : ${{ secrets.ENV_TEST }}
51
+ run : |
52
+ echo "$ENV_TEST" > .env.test
53
+ shell : bash
54
+ - name : Notify on SUCCESS
55
+ if : ${{ SUCCESS() }}
56
+ uses : ravsamhq/notify-slack-action@v2
57
+ with :
58
+ status : ${{ job.status }}
59
+ notification_title : " {emoji} *{job}* has {status_message}"
60
+ message_format : " *{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
61
+ footer : " Linked Repo <{repo_url}|{repo}>"
62
+ mention_users : " D056LFW47NF,"
63
+ mention_users_when : " SUCCESS"
64
+ mention_groups : " C06H0SB11JL"
65
+ mention_groups_when : " SUCCESS"
66
+ env :
67
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
68
+ - name : Notify on FAIL
69
+ if : ${{ failure() }}
70
+ uses : ravsamhq/notify-slack-action@v2
71
+ with :
72
+ status : ${{ job.status }}
73
+ notification_title : " {emoji} *{job}* has {status_message}"
74
+ message_format : " *{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
75
+ footer : " Linked Repo <{repo_url}|{repo}>"
76
+ mention_users : " D056LFW47NF"
77
+ mention_users_when : " failure,warnings"
78
+ mention_groups : " C06G95T1YH3"
79
+ mention_groups_when : " failure,warnings"
80
+ env :
81
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}
59
82
Nginx-ARM64 :
60
83
strategy :
61
84
matrix :
@@ -174,17 +197,40 @@ jobs:
174
197
docker-compose down
175
198
sudo rm -rf /tmp/nginx
176
199
echo "y" | docker image prune -a
177
- - name : Slack Notification
178
- uses : rtCamp/action-slack-notify@v2
200
+ - name : Create ENV
179
201
env :
180
- SLACK_CHANNEL : github_action_status
181
- SLACK_COLOR : ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
182
- SLACK_ICON : https://github.com/rtCamp.png?size=48
183
- SLACK_MESSAGE : ' Post Content Nginx PHP ${{ matrix.pv }} AMD64 :rocket:'
184
- SLACK_TITLE : Post Title
185
- SLACK_USERNAME : rtCamp
186
- SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK_URL }}
187
- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
202
+ ENV_TEST : ${{ secrets.ENV_TEST }}
203
+ run : |
204
+ echo "$ENV_TEST" > .env.test
205
+ shell : bash
206
+ - name : Notify on SUCCESS
207
+ if : ${{ SUCCESS() }}
208
+ uses : ravsamhq/notify-slack-action@v2
209
+ with :
210
+ status : ${{ job.status }}
211
+ notification_title : " {emoji} *{job}* has {status_message}"
212
+ message_format : " *{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
213
+ footer : " Linked Repo <{repo_url}|{repo}>"
214
+ mention_users : " D056LFW47NF,"
215
+ mention_users_when : " SUCCESS"
216
+ mention_groups : " C06H0SB11JL"
217
+ mention_groups_when : " SUCCESS"
218
+ env :
219
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
220
+ - name : Notify on FAIL
221
+ if : ${{ failure() }}
222
+ uses : ravsamhq/notify-slack-action@v2
223
+ with :
224
+ status : ${{ job.status }}
225
+ notification_title : " {emoji} *{job}* has {status_message}"
226
+ message_format : " *{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
227
+ footer : " Linked Repo <{repo_url}|{repo}>"
228
+ mention_users : " D056LFW47NF"
229
+ mention_users_when : " failure,warnings"
230
+ mention_groups : " C06G95T1YH3"
231
+ mention_groups_when : " failure,warnings"
232
+ env :
233
+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}
188
234
Nginx75-ARM64 :
189
235
strategy :
190
236
matrix :
0 commit comments