Skip to content

Commit 7e07d5a

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

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

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

+29-20
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,32 @@ 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: Reply with output of linkcheck
32-
if: always()
33-
uses: slackapi/[email protected] # ref: https://github.com/slackapi/slack-github-action
34-
with:
35-
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
36-
webhook-type: incoming-webhook
37-
payload: |
38-
channel: ${{ secrets.SLACK_CHANNEL_ID }}
39-
thread_ts: "{{ steps.initial_message.outputs.ts }}"
40-
text: "$LINKCHECK_OUTPUT"
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 }}

0 commit comments

Comments
 (0)