-
Notifications
You must be signed in to change notification settings - Fork 45
54 lines (41 loc) · 1.11 KB
/
sync_mirror.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
45
46
47
48
49
50
51
52
53
54
name: Sync archive folder
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Zip archive folder
run: |
zip -r ../archive.zip ./addons/panku_console
- name: Create commit hash file
run: |
echo $GITHUB_SHA > ../COMMIT_SHA
- name: Get commit info
run: |
MSG=$(git log -1 --pretty=%B)
LINK=https://github.com/Ark2000/PankuConsole/commit/
echo "SYNC: $MSG ($LINK$GITHUB_SHA)" >> ../COMMIT_MSG
- name: Extract archive
uses: actions/checkout@v2
with:
repository: Ark2000/panku_console
token: ${{ secrets.TOKEN }}
- run: |
rm -rf *
unzip ../archive.zip
cp -r addons/panku_console/* ./
cp ../COMMIT_SHA ./
rm -rf addons
ls -a
- name: Commit and push
run: |
git config user.name k2kra
git config user.email ark2000@foxmail.com
git add .
git commit -m "$(cat ../COMMIT_MSG))"
git push
echo "git push output: $?"