Update update_NDM.yml
only run if git diff is not empty
This commit is contained in:
parent
b5856dd64e
commit
149bab777f
1 changed files with 2 additions and 2 deletions
4
.github/workflows/update_NDM.yml
vendored
4
.github/workflows/update_NDM.yml
vendored
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue