Merge pull request #315 from chuckwagoncomputing/no-date-2

Don't commit files if only date or Kicad version changed
This commit is contained in:
rusefillc 2023-07-26 11:19:09 -04:00 committed by GitHub
commit 2910ddfa88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -52,6 +52,11 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
git diff --name-only | while read f; do
if [ $(git diff --color=always|perl -wlne 'print $1 if /^\e\[32m\+\e\[m\e\[32m(.*)\e\[m$/' "$f" | grep -vE "Created|Generation|[dD]ate" | wc -l) -eq 0 ]; then
git checkout "$f"
fi
done
bash hellen-one/bin/gha-commit.sh
- name: Push board files

View File

@ -6,7 +6,7 @@ git add boards/*
git reset HEAD *.kicad_pro
git status
OUT=$(git commit -am "[skip actions] Auto-generated board" 2>&1) || echo "commit failed, finding out why"
if echo "$OUT" | grep 'nothing to commit'; then
if echo "$OUT" | grep 'nothing to commit' || echo "$OUT" | grep 'nothing added to commit'; then
echo "headers: looks like nothing to commit"
echo "::set-env name=NOCOMMIT::true"
exit 0