File tree Expand file tree Collapse file tree 4 files changed +29
-15
lines changed
packages/sdk-components-animation Expand file tree Collapse file tree 4 files changed +29
-15
lines changed Original file line number Diff line number Diff line change @@ -16,28 +16,28 @@ runs:
16
16
using : " composite"
17
17
18
18
steps :
19
- - uses : actions/checkout@v4
20
- with :
21
- ref : ${{ inputs.ref }}
22
- submodules : ${{ inputs.submodules-ssh-key && 'recursive' || false }}
23
- ssh-key : ${{ inputs.submodules-ssh-key }}
24
-
25
- - name : Show main readme
19
+ - name : Set up SSH for Git
20
+ if : ${{ inputs.submodules-ssh-key }}
26
21
run : |
27
- cat ./packages/sdk-components-animation/private-src/README.md || echo "No README found"
22
+ mkdir -p ~/.ssh
23
+ echo "${{ inputs.submodules-ssh-key }}" > ~/.ssh/id_ed25519
24
+ chmod 600 ~/.ssh/id_ed25519
25
+ ssh-keyscan github.com >> ~/.ssh/known_hosts
26
+ shell : bash
27
+
28
+ - name : Verify SSH Connection (Optional)
29
+ if : ${{ inputs.submodules-ssh-key }}
30
+ run :
ssh -T [email protected] || true
28
31
shell : bash
29
32
30
33
- name : Try checkout submodules to the same branch as main repo
31
34
if : ${{ inputs.submodules-ssh-key }}
32
35
run : |
33
- git submodule foreach '
34
- BRANCH=$(git -C $toplevel rev-parse --abbrev-ref HEAD);
35
- if git ls-remote --exit-code --heads origin "$BRANCH" > /dev/null; then
36
- git checkout "$BRANCH" && git pull origin "$BRANCH";
37
- fi;'
36
+ ./submodules.sh
38
37
shell : bash
39
38
40
- - name : Show readme
39
+ - name : Show main readme
40
+ if : ${{ inputs.submodules-ssh-key }}
41
41
run : |
42
42
cat ./packages/sdk-components-animation/private-src/README.md || echo "No README found"
43
43
shell : bash
Original file line number Diff line number Diff line change 30
30
BUILDER_HOST : ${{ inputs.builder-host }}
31
31
32
32
steps :
33
+ - uses : actions/checkout@v4
34
+ with :
35
+ ref : ${{ github.event.pull_request.head.sha || github.sha }}
33
36
- uses : ./.github/actions/checkout
34
37
with :
35
38
ref : ${{ github.event.pull_request.head.sha || github.sha }}
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ git submodule update --init --recursive
4
+
5
+ git submodule foreach '
6
+ BRANCH=$(git -C $toplevel rev-parse --abbrev-ref HEAD);
7
+ if git ls-remote --exit-code --heads origin "$BRANCH" > /dev/null; then
8
+ git checkout "$BRANCH" && git pull origin "$BRANCH";
9
+ else
10
+ git checkout "main" && git pull origin "main";
11
+ fi;'
You can’t perform that action at this time.
0 commit comments