-
Notifications
You must be signed in to change notification settings - Fork 639
44 lines (38 loc) · 1.07 KB
/
update-dates.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Update Dates
on:
workflow_run:
workflows:
- "Update CHANGELOG"
branches:
- main
types:
- completed
concurrency:
group: Update Dates
jobs:
update-dates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.DOKA_BOT_ACCESS_TOKEN }}
fetch-depth: 2
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Правка полей updatedAt и createdAt
run: node .github/scripts/update-dates.js
- name: Создание коммита с обновлениями полей
run: |
if [[ -z $(git status -s) ]]
then
echo $(git status)
else
git config user.name "Doka Dog"
git config user.email "<[email protected]>"
git add "./**/index.11tydata.json"
git commit -m "Правит поля updatedAt и createdAt" --author "Doka Dog <[email protected]>"
git pull --rebase
git push origin main
exit
fi