Skip to content

Commit

Permalink
Уводит коммит внутрь скрипта
Browse files Browse the repository at this point in the history
  • Loading branch information
igsekor committed Jul 19, 2024
1 parent bf702dd commit 25b547c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
18 changes: 18 additions & 0 deletions .github/scripts/update-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ if [ -s added-content.txt ]; then
FORMATTED_DATE="$DAY $RUS_MONTH"

node .github/scripts/update-changelog.js "$FORMATTED_DATE"

rm -f added-content.txt

if [[ -z $(git status -s) ]]
then
echo $(git status)
else
git config --global user.name "Doka Dog"
git config --global user.email "<[email protected]>"

git add CHANGELOG.md
git commit -m "Обновляет CHANGELOG" --author "Doka Dog <[email protected]>"

git pull --rebase
git push origin main

exit
fi
else
echo "Новых материалов не было в предыдущем коммите"
fi
17 changes: 0 additions & 17 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,3 @@ jobs:
node-version: 20
- name: Ищет новые материалы и обновляет CHANGELOG
run: sh .github/scripts/update-changelog.sh
- name: Создание коммита с обновлениями полей
run: |
if [[ -z $(git status -s) ]]
then
echo $(git status)
else
git config --global user.name "Doka Dog"
git config --global user.email "<[email protected]>"
git add CHANGELOG.md
git commit -m "Обновляет CHANGELOG" --author "Doka Dog <[email protected]>"
git pull --rebase
git push origin main
exit
fi

0 comments on commit 25b547c

Please sign in to comment.