forked from shabados/database
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1.04 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
name: Update submodule
on:
repository_dispatch:
types: update
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PA_TOKEN }}
submodules: true
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: unnecessary
- name: Retrieve Github Host Keys
run: ssh-keyscan github.com > ~/.ssh/known_hosts
- name: Update submodule
run: |
git submodule update --init --recursive --checkout -f --remote -- "${{github.event.client_payload.module}}"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git commit -am "ci: ${{github.event.client_payload.module}} - ${{github.event.client_payload.sha}}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
ssh: true
branch: ${{ github.ref }}