File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 push :
77 paths :
88 - ' .github/workflows/build.yml'
9+ - ' .github/scripts/build.sh'
10+ - ' .github/scripts/prepmsg.sh'
911 - ' *.po'
1012 - ' **/*.po'
1113
1214env :
13- # CPython branch where translations currently take place
1415 CPYTHON_BRANCH : ' 3.10'
1516 LANGUAGE : ' pt_BR'
1617
5657 path : cpython/Doc/build/html
5758 - name : Prepare error log for notification if it exists
5859 if : failure()
59- shell : bash
6060 run : |
61- sh scripts/setup-notif-message .sh error.log notify.log
61+ sh scripts/prepmsg .sh error.log notify.log
6262 env :
6363 GITHUB_JOB : ${GITHUB_JOB}
6464 GITHUB_RUN_NUMBER : ${GITHUB_RUN_NUMBER}
Original file line number Diff line number Diff line change 1- #! /bin/sh
2- # Prepare message for Telegram notification
3-
4- set -e
5- Set -x
6-
7- [ $# -ne 2 ] && ( echo " Expected 1 input and 1 output files, got $# ." ; exit ; )0
8- [ ! -f $1 ] && ( echo " Input file $1 not found, skipping." ; exit ; )
9-
10- URL=" https://github.com/${GITHUB_REPOSITORY} /actions/runs/${GITHUB_RUN_NUMBER} "
11-
12- echo " ❌ *${GITHUB_JOB} * ([ID *${GITHUB_RUN_NUMBER} *]($URL )):" > $2
13- grep ' cpython/Doc/.*WARNING:' $1 | sed ' s|.*/cpython/Doc|Doc|' | uniq >> $2
1+ #! /bin/sh
2+ # Prepare message for Telegram notification
3+ set -ex
4+
5+ [ $# -ne 2 ] && ( echo " Expected 1 input and 1 output files, got $# " ; exit ; )
6+ [ ! -f $1 ] && ( echo " Input file $1 not found, skipping." ; exit ; )
7+ for var in GITHUB_REPOSITORY GITHUB_RUN_NUMBER GITHUB_JOB; do
8+ [ -z ${! var} ] && ( echo " ${! var} is empty." ; exit 1; )
9+ done
10+
11+ URL=" https://github.com/${GITHUB_REPOSITORY} /actions/runs/${GITHUB_RUN_NUMBER} "
12+ echo " ❌ *${GITHUB_JOB} * ([ID *${GITHUB_RUN_NUMBER} *]($URL )):" > $2
13+ echo " " >> $2
14+ grep ' cpython/Doc/.*WARNING:' $1 | sed ' s|.*/cpython/Doc|Doc|' | uniq >> $2
You can’t perform that action at this time.
0 commit comments