From 55b6f9bc991090b6eb524bcc8fc0b5d86dfe3b4a Mon Sep 17 00:00:00 2001 From: Lucas PASCAL Date: Mon, 14 Mar 2022 14:54:17 +0100 Subject: [PATCH] [fix] Step condition variable was improperly defined --- .github/actions/commit-changes/action.yml | 15 ++++++++++++--- .github/workflows/sdk-generation.yml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/actions/commit-changes/action.yml b/.github/actions/commit-changes/action.yml index a1515bd..147feb6 100644 --- a/.github/actions/commit-changes/action.yml +++ b/.github/actions/commit-changes/action.yml @@ -44,25 +44,34 @@ runs: ORIGIN="$(pwd)" cd ${{ inputs.directory }} git switch ${{ inputs.branch }} 2>/dev/null || git switch -c ${{ inputs.branch }} + echo "-----------------------------------------------------------" + echo "Initial repo status" git status CHANGES="$(git status --porcelain ${{ inputs.files }})" if [ -z "${CHANGES}" ]; \ then \ + echo "-----------------------------------------------------------"; \ echo "No changes, stopping now"; \ - echo "::save-state name=COMMIT::NO"; \ + echo "COMMIT=NO" > $GITHUB_ENV; \ cd "${ORIGIN}"; \ exit 0; \ fi echo -e "Changes:\n${CHANGES}" git add ${{ inputs.files }} + echo "-----------------------------------------------------------" + echo "Repo status before commit" + git status git commit -am "${{ inputs.message }}" - echo "::save-state name=COMMIT::YES" + echo "COMMIT=YES" > $GITHUB_ENV git log -n 2 cd "${ORIGIN}" shell: bash + - run: echo "${{ env.COMMIT }}" + shell: bash + - name: Push commit - if: ${{ steps.commit.state.COMMIT == 'YES' }} + if: ${{ env.COMMIT == 'YES' }} uses: ad-m/github-push-action@master with: github_token: ${{ inputs.secret }} diff --git a/.github/workflows/sdk-generation.yml b/.github/workflows/sdk-generation.yml index 7636bf6..bb11552 100644 --- a/.github/workflows/sdk-generation.yml +++ b/.github/workflows/sdk-generation.yml @@ -50,4 +50,4 @@ jobs: 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 + repository: LedgerHQ/app-ethereum