File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments