Skip to content

Commit 4023a12

Browse files
dorkmoCopilot
andauthored
Update .github/workflows/generate-web-controller-preview.yml
Co-authored-by: Copilot <[email protected]>
1 parent 1286913 commit 4023a12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/generate-web-controller-preview.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,12 @@ jobs:
9696
git config --global user.name 'github-actions[bot]'
9797
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
9898
git add LifeTrac-v25/raspberry_pi_web_controller/preview/web-controller-preview.png
99-
git diff --staged --quiet || (git commit -m "Update web controller preview screenshot [skip ci]" && git push)
99+
if ! git diff --staged --quiet; then
100+
git commit -m "Update web controller preview screenshot [skip ci]"
101+
git push --force-with-lease origin HEAD || { echo "ERROR: git push failed. Please check for conflicts or permission issues."; exit 1; }
102+
else
103+
echo "No changes to commit."
104+
fi
100105
env:
101106
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102107

0 commit comments

Comments
 (0)