forked from eclipse-edc/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.28 KB
/
update-submodules.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
name: Update submodules
on:
schedule:
- cron: "0 6 * * 01" # every monday at 6 am (UTC)
workflow_dispatch:
env:
COMMIT_MESSAGE: "chore: update submodules"
jobs:
sync-shared-submodule:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
submodules: "true"
- name: Pull Remote Changes
run: git pull
- name: Update submodule
run: |
git submodule update --init --remote
echo "NEW_BRANCH=update-submodules-${GITHUB_SHA}" >> $GITHUB_ENV
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: ${{ env.NEW_BRANCH }}
create_branch: true
commit_message: ${{ env.COMMIT_MESSAGE }}
commit_user_name: eclipse-edc-bot
commit_user_email: edc-bot@eclipse.org
commit_author: eclipse-edc-bot <edc-bot@eclipse.org>
- name: Create a pull request
id: create_a_pull_request
uses: vsoch/pull-request-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_BRANCH: "main"
PULL_REQUEST_FROM_BRANCH: ${{ env.NEW_BRANCH }}
PULL_REQUEST_TITLE: ${{ env.COMMIT_MESSAGE }}