Skip to content

Commit 07ff081

Browse files
committedOct 12, 2021
Add update action
1 parent 3bdab59 commit 07ff081

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
 

‎.github/workflows/update.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Update
2+
3+
on:
4+
schedule:
5+
- cron: '30 2 * * *'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@master
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
submodules: true
16+
- name: Git Sumbodule Update
17+
run: |
18+
git pull --recurse-submodules
19+
git submodule update --remote --recursive
20+
- name: Commit update
21+
run: |
22+
git config --global user.name 'zenyfish'
23+
git config --global user.email 'zenyfish@users.noreply.github.com'
24+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
25+
git commit -am "Auto updated submodule references" && git push || echo "No changes to commit"

‎.gitmodules

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[submodule "source-data"]
22
path = source-data
33
url = https://github.com/zengin-code/source-data.git
4+
branch = master

0 commit comments

Comments
 (0)
Please sign in to comment.