Skip to content

Commit

Permalink
format yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nikmel2803 committed Jul 16, 2024
1 parent b7cdd88 commit eadd845
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/check-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ jobs:
- name: Prepare report
id: prepare-report
run: |
LENGTH=$(jq '.links | length' links-report.json)
LENGTH=$(jq '.links | length' links-report.json)
if [ "$length" -gt 0 ]; then
echo "send_report=true" >> $GITHUB_OUTPUT
else
echo "send_report=false" >> $GITHUB_OUTPUT
fi
if [ "$length" -gt 0 ]; then
echo "send_report=true" >> $GITHUB_OUTPUT
else
echo "send_report=false" >> $GITHUB_OUTPUT
fi
REPORT_LIST=$(jq '[.links[] | select(.state == "OK") | "- `\(.url)` (status: `\(.status)`) on the page \(.parent)"] | join(" \n")' links-report.json)
echo "report_list=$REPORT_LIST" >> $GITHUB_OUTPUT
REPORT_LIST=$(jq '[.links[] | select(.state == "OK") | "- `\(.url)` (status: `\(.status)`) on the page \(.parent)"] | join(" \n")' links-report.json)
echo "report_list=$REPORT_LIST" >> $GITHUB_OUTPUT
- name: Send report
uses: slackapi/[email protected]
if: steps.prepare-report.outputs.send_report == 'true'
with:
channel-id: 'alerts-test'
payload: |
{
"text": "Report",
"blocks": [
channel-id: "alerts-test"
payload: |
{
"text": "Report",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ${{ steps.prepare-report.outputs.report_list }}
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

0 comments on commit eadd845

Please sign in to comment.