From 358fcbd4eebb649c12176aa21cb7c2b59a6a0bdb Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Mon, 14 Mar 2022 09:55:49 +0100 Subject: [PATCH 1/2] [add] SDK submodule updated to develop + will now be auto updated --- .github/workflows/sdk-generation.yml | 10 ++++++++++ ethereum-plugin-sdk | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sdk-generation.yml b/.github/workflows/sdk-generation.yml index 162371e..7636bf6 100644 --- a/.github/workflows/sdk-generation.yml +++ b/.github/workflows/sdk-generation.yml @@ -41,3 +41,13 @@ jobs: message: "[update] Branch ${{ steps.extract_branch.outputs.branch }} | Commit ${GITHUB_SHA}" secret: ${{ secrets.CI_BOT_TOKEN }} repository: LedgerHQ/ethereum-plugin-sdk + + - name: Update the SDK submodule in the Ethereum app + uses: ./.github/actions/commit-changes + with: + name: 'ldg-github-ci' + files: ethereum-plugin-sdk + branch: ${{ steps.extract_branch.outputs.branch }} + message: "[update][SDK] Branch ${{ steps.extract_branch.outputs.branch }} | Commit ${GITHUB_SHA}" + secret: ${{ secrets.CI_BOT_TOKEN }} + repository: LedgerHQ/ethereum-plugin-sdk diff --git a/ethereum-plugin-sdk b/ethereum-plugin-sdk index 3a79796..372446f 160000 --- a/ethereum-plugin-sdk +++ b/ethereum-plugin-sdk @@ -1 +1 @@ -Subproject commit 3a797967f43ec1a055c3b44f03a2b86829f72c77 +Subproject commit 372446f671ccec7dbd563cff2ee81473ca44bea5 From 60656c1b56d312d95bda23d119b902d60819b20b Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Mon, 14 Mar 2022 10:20:48 +0100 Subject: [PATCH 2/2] [fix] Bad bash syntax in github action --- .github/actions/commit-changes/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/commit-changes/action.yml b/.github/actions/commit-changes/action.yml index 0d8ac4f..a1515bd 100644 --- a/.github/actions/commit-changes/action.yml +++ b/.github/actions/commit-changes/action.yml @@ -38,6 +38,7 @@ runs: using: 'composite' steps: - name: Commit the changes + id: commit run: | git config --global user.name ${{ inputs.name }} ORIGIN="$(pwd)" @@ -48,17 +49,20 @@ runs: if [ -z "${CHANGES}" ]; \ then \ echo "No changes, stopping now"; \ - cd ${origin} \ + echo "::save-state name=COMMIT::NO"; \ + cd "${ORIGIN}"; \ exit 0; \ fi echo -e "Changes:\n${CHANGES}" git add ${{ inputs.files }} git commit -am "${{ inputs.message }}" + echo "::save-state name=COMMIT::YES" git log -n 2 - cd ${ORIGIN} + cd "${ORIGIN}" shell: bash - name: Push commit + if: ${{ steps.commit.state.COMMIT == 'YES' }} uses: ad-m/github-push-action@master with: github_token: ${{ inputs.secret }}