From 102b133a683f2b6bf3ff9f02b2cece5df39c86b0 Mon Sep 17 00:00:00 2001 From: Dorota Jarecka Date: Wed, 2 Oct 2024 23:32:54 -0400 Subject: [PATCH] fixing generate_yaml_model.yaml --- .github/workflows/generate_yaml_model.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/generate_yaml_model.yaml b/.github/workflows/generate_yaml_model.yaml index 63a760a6..2f5eb7cd 100644 --- a/.github/workflows/generate_yaml_model.yaml +++ b/.github/workflows/generate_yaml_model.yaml @@ -43,10 +43,14 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - git add linkml-schema/library_generation.yaml - git add linkml-schema/source_library_generation/gsheet_output - if ! git diff --quiet; then - git commit -m "generate new yaml file" + if ! git ls-files --error-unmatch linkml-schema/library_generation.yaml; then + git add linkml-schema/library_generation.yaml + git add linkml-schema/source_library_generation/gsheet_output + git commit -m "adding a new linkml model" + elif ! git diff --quiet; then + git add linkml-schema/library_generation.yaml + git add linkml-schema/source_library_generation/gsheet_output + git commit -m "generate new version of the linkml model" git push else echo "No changes to commit"