-
Notifications
You must be signed in to change notification settings - Fork 17
39 lines (36 loc) · 1.46 KB
/
submodulesync.yaml
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
name: Sync Submodules
on:
schedule:
- cron: '0 9 * * 1'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update submodules
run: |
git submodule update --remote
# pin submodule to a commit, https://github.com/lima-vm/lima/commit/bd7442e34ebdccb4945828a007b5d102781bea92
# (cd src/lima && git checkout bd7442e34ebdccb4945828a007b5d102781bea92)
(cd src/lima && git fetch --tags)
TAG=`cd src/lima && git describe --tags $(git rev-list --tags --max-count=1)`
echo "Pulling changes from release: $TAG"
(cd src/lima && git checkout $TAG)
# finch-daemon
(cd src/finch-daemon && git fetch --tags)
FINCH_DAEMON_TAG=`cd src/finch-daemon && git describe --tags $(git rev-list --tags --max-count=1)`
echo "Pulling changes from release: $FINCH_DAEMON_TAG"
(cd src/finch-daemon && git checkout $FINCH_DAEMON_TAG)
- name: Create PR
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: bump submodules
signoff: true
title: 'build(deps): Bump submodules'