Skip to content

Commit 4558157

Browse files
authored
Merge pull request #194 from puja-trivedi/issue193
updated resuable-generate_other_formats such that it pulls any updates, then pushes new changes
2 parents 4e9fa82 + 84fdfd2 commit 4558157

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/reusable-generate_other_formats.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,21 @@ jobs:
102102
git status
103103
done
104104
if ! git diff --cached --quiet; then
105-
git commit -m "generate another formats for ${models_list} model(s)"
106105
git status
107106
# Stash any remaining local changes (including untracked files) before pulling
108107
git stash --include-untracked
109108
if git pull --rebase; then
109+
git stash pop || echo "No stashed changes to apply"
110+
git add .
111+
git commit -m "generate another formats for ${models_list} model(s)"
110112
git push
111113
else
112114
echo "Failed to pull --rebase, setting upstream"
115+
git stash pop || echo "No stashed changes to apply"
116+
git add .
117+
git commit -m "generate another formats for ${models_list} model(s)"
113118
git push --set-upstream origin $BRANCH_NAME
114119
fi
115-
# Unstash the changes so they're available for the next workflow step
116-
git stash pop || echo "No stashed changes to apply"
117120
else
118121
echo "No changes to commit"
119122
fi

0 commit comments

Comments
 (0)