@@ -64,34 +64,33 @@ jobs:
6464 framework : kubernetes
6565 quiet : true
6666 soft_fail : true
67-
68- notify :
69- name : Discord Notification
70- runs-on : ubuntu-latest
71- needs : [kubeconform, kube-linter, checkov]
72- if : always()
73- steps :
74- - name : Report to Discord
75- run : |-
76- if [ "${{ needs.kubeconform.result }}" = "success" ] && \
77- [ "${{ needs.kube-linter.result }}" = "success" ] && \
78- [ "${{ needs.checkov.result }}" = "success" ]; then
79- STATUS="✅ Success"
80- else
81- STATUS="❌ Failed (kubeconform: ${{ needs.kubeconform.result }}, kube-linter: ${{ needs.kube-linter.result }}, checkov: ${{ needs.checkov.result }})"
82- fi
83-
84- BRANCH=$(echo "${GITHUB_REF}" | sed 's|refs/heads/||')
85- COMMIT_URL="https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
86-
87- MESSAGE="**Workflow:** ${GITHUB_WORKFLOW}
88- **Status:** $STATUS
89- **Branch:** $BRANCH
90- **Commit:** <$COMMIT_URL>
91- **Actor:** ${GITHUB_ACTOR}"
92-
93- JSON=$(jq -n --arg content "$MESSAGE" '{content: $content}')
94-
95- curl -X POST -H "Content-Type: application/json" \
96- -d "$JSON" \
97- ${{ secrets.DISCORD_WEBHOOK_URL }}
67+ # notify:
68+ # name: Discord Notification
69+ # runs-on: ubuntu-latest
70+ # needs: [kubeconform, kube-linter, checkov]
71+ # if: always()
72+ # steps:
73+ # - name: Report to Discord
74+ # run: |-
75+ # if [ "${{ needs.kubeconform.result }}" = "success" ] && \
76+ # [ "${{ needs.kube-linter.result }}" = "success" ] && \
77+ # [ "${{ needs.checkov.result }}" = "success" ]; then
78+ # STATUS="✅ Success"
79+ # else
80+ # STATUS="❌ Failed (kubeconform: ${{ needs.kubeconform.result }}, kube-linter: ${{ needs.kube-linter.result }}, checkov: ${{ needs.checkov.result }})"
81+ # fi
82+ #
83+ # BRANCH=$(echo "${GITHUB_REF}" | sed 's|refs/heads/||')
84+ # COMMIT_URL="https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
85+ #
86+ # MESSAGE="**Workflow:** ${GITHUB_WORKFLOW}
87+ # **Status:** $STATUS
88+ # **Branch:** $BRANCH
89+ # **Commit:** <$COMMIT_URL>
90+ # **Actor:** ${GITHUB_ACTOR}"
91+ #
92+ # JSON=$(jq -n --arg content "$MESSAGE" '{content: $content}')
93+ #
94+ # curl -X POST -H "Content-Type: application/json" \
95+ # -d "$JSON" \
96+ # ${{ secrets.DISCORD_WEBHOOK_URL }}
0 commit comments