Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7efe95 commit a41f04cCopy full SHA for a41f04c
scripts/prepmsg.sh
@@ -4,9 +4,9 @@ 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
+[ -z "${GITHUB_REPOSITORY}" ] && (echo "GITHUB_REPOSITORY is empty."; exit 1;)
+[ -z "${GITHUB_RUN_NUMBER}" ] && (echo "GITHUB_RUN_NUMBER is empty."; exit 1;)
+[ -z "${GITHUB_JOB}" ] && (echo "GITHUB_JOB is empty."; exit 1;)
10
11
URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_NUMBER}"
12
echo "❌ *${GITHUB_JOB}* ([ID *${GITHUB_RUN_NUMBER}*]($URL)):" > $2
0 commit comments