File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : ADJ Validator
22
33on :
4- push :
4+ push :
55 pull_request :
66
77jobs :
2323 pip install jsonschema
2424
2525 - name : Run ADJ validation
26+ id : adj_validation
2627 run : |
27- python3 .github/workflows/scripts/adj-tester/main.py
28+ set +e
29+ python3 .github/workflows/scripts/adj-tester/main.py 2> error.log
30+ EXIT_CODE=$?
31+ echo "exit_code=$EXIT_CODE" >> $GITHUB_OUTPUT
32+ exit $EXIT_CODE
33+
34+ - name : Send Slack notification if failed
35+ if : failure()
36+ run : |
37+ ERROR_MESSAGE=$(cat error.log)
38+
39+ curl -X POST -H 'Content-type: application/json' \
40+ --data "{
41+ \"text\": \"❌ *ADJ Validator Failed* \n
42+ Repository: ${{ github.repository }} \n
43+ Branch: ${{ github.ref_name }} \n
44+ Actor: ${{ github.actor }} \n
45+ Commit: ${{ github.sha }} \n
46+ Error:\n\`\`\`$ERROR_MESSAGE\`\`\`\"
47+ }" \
48+ ${{ secrets.SLACK_WEBHOOK_URL }}
You can’t perform that action at this time.
0 commit comments