-
Notifications
You must be signed in to change notification settings - Fork 659
40 lines (36 loc) · 1.05 KB
/
upMd.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
name: 🥳 up submodule
on:
push:
branches:
- main
schedule:
# every day at 5:30
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
templates:
runs-on: ubuntu-latest
if: github.repository == 'hktalent/scan4all'
steps:
- uses: actions/checkout@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
fetch-depth: 0
- name: Install Dependences
run: sudo apt install -yy git
- name: update all submodule
id: new-additions
run: |
git pull
git -c protocol.version=2 submodule update --remote --force --recursive
- name: Commit files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit --allow-empty -m "Auto update all submodule [$(date)]" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}