You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
388 B
Bash
11 lines
388 B
Bash
4 years ago
|
# This script checks if any source files were modified in a push event
|
||
|
# If source files were indeed modified, then this script sets `BUILD=true`
|
||
|
|
||
4 years ago
|
set -euo pipefail
|
||
4 years ago
|
SRC_CHANGED_COUNT=$(git diff --numstat HEAD^..HEAD -- '*.rs' '*.yml' '*.toml' 'Dockerfile' | wc -l)
|
||
4 years ago
|
|
||
4 years ago
|
if [ $SRC_CHANGED_COUNT != "0" ]; then
|
||
4 years ago
|
echo "The docker image has to be built"
|
||
|
echo "BUILD=true" >>$GITHUB_ENV
|
||
|
fi
|