From eadd845ed9a919115b392a269cd1d5736889b78e Mon Sep 17 00:00:00 2001 From: Nikita Melnikov Date: Tue, 16 Jul 2024 10:38:50 +0100 Subject: [PATCH] format yaml --- .github/workflows/check-links.yaml | 34 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index d43e9b51..98b2cdb5 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -22,26 +22,26 @@ 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/slack-github-action@v1.26.0 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": { @@ -49,7 +49,7 @@ jobs: "text": ${{ steps.prepare-report.outputs.report_list }} } } - ] - } - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} + ] + } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}