Skip to content

Commit 3c20a1c

Browse files
Codelaxremyleone
andauthored
ci(announce): replace webhook matrix by a bash loop (#1585)
Co-authored-by: Rémy Léone <rleone@scaleway.com>
1 parent c6fbb1f commit 3c20a1c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/announce.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ on:
55
jobs:
66
slack:
77
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
webhook: ${{ fromJSON(secrets.SLACK_WEBHOOKS) }}
118
steps:
129
- name: Get tag
1310
id: get_tag
@@ -27,7 +24,9 @@ jobs:
2724
- name: Announce on slack
2825
id: announce_slack
2926
run: |
30-
curl -X POST -H 'Content-type: application/json' \
27+
readarray -td' ' URL_LIST <<<$SLACK_WEBHOOKS;
28+
for WEBHOOK_URL in ${URL_LIST[@]};
29+
do curl -X POST -H 'Content-type: application/json' \
3130
--data '{
3231
"blocks": [
3332
{
@@ -39,7 +38,8 @@ jobs:
3938
}
4039
]
4140
}' \
42-
${WEBHOOK_URL}
41+
${WEBHOOK_URL};
42+
done
4343
env:
44-
WEBHOOK_URL: ${{ matrix.webhook }}
44+
SLACK_WEBHOOKS: ${{ secrets.SLACK_WEBHOOKS }}
4545
MESSAGE: ${{ steps.get_message.outputs.MSG }}

0 commit comments

Comments
 (0)