-
Notifications
You must be signed in to change notification settings - Fork 27
44 lines (37 loc) · 1.15 KB
/
update.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 CKEditor 4 submodule
on:
schedule:
- cron: "0 0,10,16 * * *"
jobs:
update:
runs-on: ubuntu-latest
strategy:
matrix:
branch: [master, major]
steps:
- name: Fetch changes
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Bump "ckeditor" submodule
run: |
cd ckeditor
git fetch --all
git checkout ${{ matrix.branch }}
cd ..
if [[ $(git diff origin/${{ matrix.branch }} | wc -c) -ne 0 ]]; then
git config --local user.email "[email protected]"
git config --local user.name "CKEditor Bot"
git add ckeditor
git commit -m "Update CKEditor 4 submodule HEAD."
fi
- name: Push changes
# https://github.com/marketplace/actions/github-push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ matrix.branch }}