Skip to content

Commit d2b2682

Browse files
Merge pull request #277 from LedgerHQ/update/SDK_submodule
[add] SDK submodule updated to develop + will now be auto updated
2 parents 780f75a + 60656c1 commit d2b2682

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.github/actions/commit-changes/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ runs:
3838
using: 'composite'
3939
steps:
4040
- name: Commit the changes
41+
id: commit
4142
run: |
4243
git config --global user.name ${{ inputs.name }}
4344
ORIGIN="$(pwd)"
@@ -48,17 +49,20 @@ runs:
4849
if [ -z "${CHANGES}" ]; \
4950
then \
5051
echo "No changes, stopping now"; \
51-
cd ${origin} \
52+
echo "::save-state name=COMMIT::NO"; \
53+
cd "${ORIGIN}"; \
5254
exit 0; \
5355
fi
5456
echo -e "Changes:\n${CHANGES}"
5557
git add ${{ inputs.files }}
5658
git commit -am "${{ inputs.message }}"
59+
echo "::save-state name=COMMIT::YES"
5760
git log -n 2
58-
cd ${ORIGIN}
61+
cd "${ORIGIN}"
5962
shell: bash
6063

6164
- name: Push commit
65+
if: ${{ steps.commit.state.COMMIT == 'YES' }}
6266
uses: ad-m/github-push-action@master
6367
with:
6468
github_token: ${{ inputs.secret }}

.github/workflows/sdk-generation.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,13 @@ jobs:
4141
message: "[update] Branch ${{ steps.extract_branch.outputs.branch }} | Commit ${GITHUB_SHA}"
4242
secret: ${{ secrets.CI_BOT_TOKEN }}
4343
repository: LedgerHQ/ethereum-plugin-sdk
44+
45+
- name: Update the SDK submodule in the Ethereum app
46+
uses: ./.github/actions/commit-changes
47+
with:
48+
name: 'ldg-github-ci'
49+
files: ethereum-plugin-sdk
50+
branch: ${{ steps.extract_branch.outputs.branch }}
51+
message: "[update][SDK] Branch ${{ steps.extract_branch.outputs.branch }} | Commit ${GITHUB_SHA}"
52+
secret: ${{ secrets.CI_BOT_TOKEN }}
53+
repository: LedgerHQ/ethereum-plugin-sdk

0 commit comments

Comments
 (0)