File tree 2 files changed +17
-16
lines changed 2 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 6
6
push :
7
7
paths :
8
8
- ' .github/workflows/build.yml'
9
+ - ' .github/scripts/build.sh'
10
+ - ' .github/scripts/prepmsg.sh'
9
11
- ' *.po'
10
12
- ' **/*.po'
11
13
12
14
env :
13
- # CPython branch where translations currently take place
14
15
CPYTHON_BRANCH : ' 3.10'
15
16
LANGUAGE : ' pt_BR'
16
17
56
57
path : cpython/Doc/build/html
57
58
- name : Prepare error log for notification if it exists
58
59
if : failure()
59
- shell : bash
60
60
run : |
61
- sh scripts/setup-notif-message .sh error.log notify.log
61
+ sh scripts/prepmsg .sh error.log notify.log
62
62
env :
63
63
GITHUB_JOB : ${GITHUB_JOB}
64
64
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