Skip to content

Commit e627c4a

Browse files
committed
ci: enhance template generation workflow with status checks and logging
1 parent 3635125 commit e627c4a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/generate-template.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,25 @@ jobs:
6666

6767
- name: Copy generated template to {{app_name}}
6868
run: |
69+
echo "📁 Copying template into {{app_name}}"
6970
rsync -a --delete --exclude='.git' ./example-template/ ./{{app_name}}/
71+
echo "✅ Copy complete"
7072
7173
- name: Commit and push changes
7274
id: commit
7375
run: |
74-
git add .
75-
if git diff --cached --quiet; then
76+
git fetch origin main
77+
git add -A
78+
echo "=== Git status ==="
79+
git status
80+
echo "=== Differences vs main ==="
81+
if git diff --quiet origin/main; then
7682
echo "no_changes=true" >> $GITHUB_OUTPUT
7783
echo "✅ No changes detected."
7884
else
7985
git commit -m "ci: update generated copier template from example"
8086
git push origin $GENERATED_BRANCH_NAME
87+
echo "📤 Pushed updates to $GENERATED_BRANCH_NAME"
8188
echo "no_changes=false" >> $GITHUB_OUTPUT
8289
fi
8390

0 commit comments

Comments
 (0)