diff --git a/.github/workflows/local-example.yml b/.github/workflows/local-example.yml index a4ec46301a6..03a358d8161 100644 --- a/.github/workflows/local-example.yml +++ b/.github/workflows/local-example.yml @@ -1,5 +1,5 @@ -name: Go -on: [push] +name: Local Example +on: [push, pull_request] jobs: build: @@ -11,7 +11,6 @@ jobs: uses: actions/setup-go@v1 with: go-version: 1.13 - id: local-example - name: Check out code uses: actions/checkout@v1 diff --git a/examples/local/101_initial_cluster.sh b/examples/local/101_initial_cluster.sh index 134ddbd65b5..9f018da6b55 100755 --- a/examples/local/101_initial_cluster.sh +++ b/examples/local/101_initial_cluster.sh @@ -22,6 +22,11 @@ set -e # shellcheck disable=SC2128 script_root=$(dirname "${BASH_SOURCE}") +if [[ $EUID -eq 0 ]]; then + echo "This script refuses to be run as root. Please switch to a regular user." + exit 1 +fi + # start topo server if [ "${TOPO}" = "zk2" ]; then CELL=zone1 "$script_root/zk-up.sh"