forked from hpcaitech/ColossalAI
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.35 KB
/
submodule.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
name: Synchronize Submodule
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
sync-submodule:
runs-on: ubuntu-latest
if: github.repository == 'hpcaitech/ColossalAI'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: 'main'
submodules: true
- name: echo
run: |
echo ${{github}}
- name: Git Sumbodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: Commit update
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Automated submodule synchronization"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: '[Bot] Synchronize Submodule References'
body: |
Automated PR to update submodule commits
committer: GitHub <[email protected]>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
assignees: ${{ github.actor }}
delete-branch: true
branch: create-pull-request/patch-sync-submodule