Update update_NDM.yml

only run if git diff is not empty
This commit is contained in:
srcarter3 2022-03-28 13:44:38 -06:00 committed by GitHub
parent b5856dd64e
commit 149bab777f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,14 +23,14 @@ jobs:
svn export --force https://vlab.noaa.gov/svn/awips-ndm/trunk/"$file" --username ${{ secrets.VLAB_UNAME }} --password ${{ secrets.VLAB_PASS }}
done
# Check in all the new files
# Do we need to check for a change or can we just run a git add?
# Only do a git add/commit/push if files have changed
- name: Update existing NDM files for awips2 repo
run: |
date=`date +%Y%m%d-%H:%M:%S`
git config user.name $GITHUB_ACTOR
git config user.email $GITHUB_ACTOR@users.noreply.github.com
change=`git diff`
if [ -z "$change" ]
if [ "$change" -ge 1 ]
then
git add --all
git commit -m "New NDM updates on $date - autogenerated"