Skip to content

Commit 5ff7960

Browse files
committed
feat(gen): update
1 parent 7e07d5a commit 5ff7960

File tree

1 file changed

+13
-29
lines changed

1 file changed

+13
-29
lines changed

.github/workflows/link-check-schedule.yml

+13-29
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,16 @@ jobs:
1818
cat linkcheck_output.txt
1919
echo EOF
2020
} >> "$GITHUB_ENV"
21-
# - name: Send message to Slack
22-
# if: always()
23-
# uses: slackapi/[email protected]
24-
# id: initial_message
25-
# with:
26-
# webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
27-
# webhook-type: incoming-webhook
28-
# payload: |
29-
# channel: ${{ secrets.SLACK_CHANNEL_ID }}
30-
# text: "Link check results are available in :thread:."
31-
- name: Send a message to Slack via Webhook
32-
id: send_message
33-
run: |
34-
response=$(curl -s -X POST -H 'Content-type: application/json' \
35-
--data '{
36-
"text": "Link check results are available in :thread:."
37-
}' ${{ secrets.SLACK_WEBHOOK_URL }})
38-
echo "response=$response" >> $GITHUB_ENV
39-
- name: Save thread_ts
40-
run: |
41-
echo "thread_ts=<MANUALLY_SET_OR_CAPTURE_THIS_VALUE>" >> $GITHUB_ENV
42-
43-
- name: Reply to the thread via Webhook
44-
run: |
45-
curl -s -X POST -H 'Content-type: application/json' \
46-
--data '{
47-
"text": "This is a reply to the thread.",
48-
"thread_ts": "${{ env.thread_ts }}"
49-
}' ${{ secrets.SLACK_WEBHOOK_URL }}
21+
- name: Send message to Slack
22+
if: always()
23+
uses: slackapi/[email protected]
24+
id: initial_message
25+
with:
26+
method: files.uploadV2
27+
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
28+
webhook-type: incoming-webhook
29+
payload: |
30+
channel: ${{ secrets.SLACK_CHANNEL_ID }}
31+
text: "Link check results are available in :thread:."
32+
initial_comment: "the results are in!"
33+
file: "linkcheck_output.txt"

0 commit comments

Comments
 (0)