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.
12 lines
389 B
Bash
12 lines
389 B
Bash
# 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`
|
|
|
|
set -euo pipefail
|
|
|
|
SRC_CHANGED_COUNT=$(git diff --numstat HEAD^..HEAD -- '*.rs' '*.yml' '*.toml' 'Dockerfile' | wc -l)
|
|
|
|
if [ $SRC_CHANGED_COUNT != "0" ]; then
|
|
echo "The docker image has to be built"
|
|
echo "BUILD=true" >>$GITHUB_ENV
|
|
fi
|