18 lines
506 B
YAML
18 lines
506 B
YAML
name: Check dirty git
|
|
description: Check the git status of the current directory, and raise an error if there are uncommitted changes.
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Checking dirty git
|
|
shell: bash
|
|
run: |
|
|
# Workaround for https://github.com/actions/checkout/issues/766
|
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
if [[ -n $(git status --porcelain) ]]; then
|
|
echo "repo is dirty"
|
|
git status
|
|
exit 1
|
|
fi
|