mirror of
https://codeberg.org/Codeberg-CI/examples.git
synced 2025-09-13 05:46:02 -04:00
Fix bug causing pipelines to "fail" when files unrelated to mdBook are updated.
`git commit` returns 1 if there is nothing to commit, meaning that if you `git push` any changes that don't modify the mdBook, `git` will return failure because there is nothing to commit, causing the pipeline to return failure. Adding a basic `git diff` check resolves this issue.
This commit is contained in:
parent
139788d318
commit
a1ddb62867
@ -49,5 +49,4 @@ steps:
|
|||||||
- cp .domains $CI_REPO_NAME || true
|
- cp .domains $CI_REPO_NAME || true
|
||||||
- cd $CI_REPO_NAME
|
- cd $CI_REPO_NAME
|
||||||
- git add .
|
- git add .
|
||||||
- git commit -m "Woodpecker CI ${CI_BUILD_CREATED}"
|
- if ! git diff --cached --quiet; then git commit -m "Woodpecker CI ${CI_BUILD_CREATED}" && git push; fi
|
||||||
- git push
|
|
Loading…
x
Reference in New Issue
Block a user