Not always comitting for age check
This commit is contained in:
parent
f4b87b1de0
commit
d7028d684e
1 changed files with 10 additions and 4 deletions
|
|
@ -26,10 +26,16 @@ steps:
|
|||
- bash -c 'ssh-add <(echo "$SSH_PRIVATE_KEY")'
|
||||
- git config --global user.email "${author_email:-git@polarolouis.fr}"
|
||||
- git config --global user.name "${author_name:-Bot}"
|
||||
- git add -f infos_persos.tex
|
||||
- git status
|
||||
- git commit -m "Update age in infos_persos.tex"
|
||||
- git push origin "${CI_REPO_DEFAULT_BRANCH}"
|
||||
- |
|
||||
# Check if we have modifications to commit
|
||||
CHANGES=$(git status --porcelain | wc -l)
|
||||
|
||||
if [ "$CHANGES" -gt "0" ]; then
|
||||
git add -f infos_persos.tex
|
||||
git status
|
||||
git commit -m "Update age in infos_persos.tex"
|
||||
git push origin "${CI_REPO_DEFAULT_BRANCH}"
|
||||
fi
|
||||
environment:
|
||||
# GIT_SSH_COMMAND: "ssh -i ~/.ssh/id_ed25519 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||
author_name: "Woodpecker CI"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue