From 8fcfefaf4917f3ba2aadb57ec912e14623b38ae7 Mon Sep 17 00:00:00 2001 From: Igor Korovchenko Date: Mon, 15 Jul 2024 17:09:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=20=D0=BF=D0=BE=D0=B2=D0=B5=D0=B4=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BE=D1=85=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/scripts/update-changelog.sh | 21 ++++++++++++++++----- .github/workflows/update-changelog.yml | 2 ++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/scripts/update-changelog.sh b/.github/scripts/update-changelog.sh index 66830480ca..7641daa3ed 100644 --- a/.github/scripts/update-changelog.sh +++ b/.github/scripts/update-changelog.sh @@ -27,8 +27,19 @@ FORMATTED_DATE="$DAY $RUS_MONTH" node .github/scripts/update-changelog.js "$FORMATTED_DATE" -git config --local user.email "" -git config --local user.name "Doka Dog" -git add CHANGELOG.md -git commit -m "Обновляет CHANGELOG" -git push \ No newline at end of file + +if [[ -z $(git status -s) ]] +then + echo $(git status) +else + git config user.name "Doka Dog" + git config user.email "" + + git add CHANGELOG.md + git commit -m "Обновляет CHANGELOG" --author "Doka Dog " + + git pull --rebase + git push origin main + + exit +fi \ No newline at end of file diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 4ce59aa239..9659c9cae4 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -10,6 +10,8 @@ jobs: update_changelog: if: github.event.pull_request.merged == true runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.DOKA_BOT_ACCESS_TOKEN }} steps: - name: Checkout code uses: actions/checkout@v3