#!/usr/bin/env bash

set -euo pipefail

if [ $(git diff --name-only | wc -l) -gt 0 ]; then
  echo "::error::'make build' altered tracked files. Please run 'make build' and commit the changes"
  {
    echo "'make build' altered tracked files. Please run 'make build' and commit the changes"
    echo ''
    git diff
  } >> "$GITHUB_STEP_SUMMARY"
  exit 1
fi
