Skip to content

Commit 1c0cfad

Browse files
authored
Merge pull request #2 from neurostuff/test
Test
2 parents 70ecb8d + 03c0f88 commit 1c0cfad

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/update_sdk.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,25 @@ jobs:
1919
- name: Checkout current SDK code
2020
uses: actions/checkout@v3
2121
with:
22-
repository: neurostuff/${{ sdk[0] }}
23-
path: ${{ sdk[1] }}/${{ sdk[0] }}
22+
repository: neurostuff/${{ matrix.sdk[0] }}
23+
path: ${{ matrix.sdk[1] }}/${{ matrix.sdk[0] }}
2424
- name: Checkout reciprical branch
2525
run: |
26-
cd ${{ sdk[1] }}/${{ sdk[0] }}
26+
cd ${{ matrix.sdk[1] }}/${{ matrix.sdk[0] }}
2727
git checkout ${{ github.base_ref }} 2>/dev/null || git checkout -b ${{ github.base_ref }}
2828
- name: Generate SDK
2929
run: |
30-
./generate ${{ sdk[0] }}
30+
./generate.sh ${{ matrix.sdk[0] }}
3131
- name: Add and commit changes
3232
run: |
33+
cd ${{ matrix.sdk[1] }}/${{ matrix.sdk[0] }}
3334
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
3435
git config --local user.name "github-actions[bot]"
35-
git commit -m "${{ github.sha }}" -a
36-
git push -q https://${{ secrets.SDK_PAT }}@github.com/neurostuff/${{ sdk[0] }}.git ${{ github.base_ref }}
36+
37+
# check to see if there were any changes to the repository.
38+
if [ -z $(git ls-files --other --exclude-standard --directory) ]; then
39+
echo "No files to be committed!"
40+
else
41+
git commit -m "${{ github.sha }}" -a
42+
git push -q https://${{ secrets.SDK_PAT }}@github.com/neurostuff/${{ matrix.sdk[0] }}.git ${{ github.base_ref }}
43+
fi

0 commit comments

Comments
 (0)