[fix] Step condition variable was improperly defined
This commit is contained in:
15
.github/actions/commit-changes/action.yml
vendored
15
.github/actions/commit-changes/action.yml
vendored
@@ -44,25 +44,34 @@ runs:
|
|||||||
ORIGIN="$(pwd)"
|
ORIGIN="$(pwd)"
|
||||||
cd ${{ inputs.directory }}
|
cd ${{ inputs.directory }}
|
||||||
git switch ${{ inputs.branch }} 2>/dev/null || git switch -c ${{ inputs.branch }}
|
git switch ${{ inputs.branch }} 2>/dev/null || git switch -c ${{ inputs.branch }}
|
||||||
|
echo "-----------------------------------------------------------"
|
||||||
|
echo "Initial repo status"
|
||||||
git status
|
git status
|
||||||
CHANGES="$(git status --porcelain ${{ inputs.files }})"
|
CHANGES="$(git status --porcelain ${{ inputs.files }})"
|
||||||
if [ -z "${CHANGES}" ]; \
|
if [ -z "${CHANGES}" ]; \
|
||||||
then \
|
then \
|
||||||
|
echo "-----------------------------------------------------------"; \
|
||||||
echo "No changes, stopping now"; \
|
echo "No changes, stopping now"; \
|
||||||
echo "::save-state name=COMMIT::NO"; \
|
echo "COMMIT=NO" > $GITHUB_ENV; \
|
||||||
cd "${ORIGIN}"; \
|
cd "${ORIGIN}"; \
|
||||||
exit 0; \
|
exit 0; \
|
||||||
fi
|
fi
|
||||||
echo -e "Changes:\n${CHANGES}"
|
echo -e "Changes:\n${CHANGES}"
|
||||||
git add ${{ inputs.files }}
|
git add ${{ inputs.files }}
|
||||||
|
echo "-----------------------------------------------------------"
|
||||||
|
echo "Repo status before commit"
|
||||||
|
git status
|
||||||
git commit -am "${{ inputs.message }}"
|
git commit -am "${{ inputs.message }}"
|
||||||
echo "::save-state name=COMMIT::YES"
|
echo "COMMIT=YES" > $GITHUB_ENV
|
||||||
git log -n 2
|
git log -n 2
|
||||||
cd "${ORIGIN}"
|
cd "${ORIGIN}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- run: echo "${{ env.COMMIT }}"
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Push commit
|
- name: Push commit
|
||||||
if: ${{ steps.commit.state.COMMIT == 'YES' }}
|
if: ${{ env.COMMIT == 'YES' }}
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ inputs.secret }}
|
github_token: ${{ inputs.secret }}
|
||||||
|
|||||||
2
.github/workflows/sdk-generation.yml
vendored
2
.github/workflows/sdk-generation.yml
vendored
@@ -50,4 +50,4 @@ jobs:
|
|||||||
branch: ${{ steps.extract_branch.outputs.branch }}
|
branch: ${{ steps.extract_branch.outputs.branch }}
|
||||||
message: "[update][SDK] Branch ${{ steps.extract_branch.outputs.branch }} | Commit ${GITHUB_SHA}"
|
message: "[update][SDK] Branch ${{ steps.extract_branch.outputs.branch }} | Commit ${GITHUB_SHA}"
|
||||||
secret: ${{ secrets.CI_BOT_TOKEN }}
|
secret: ${{ secrets.CI_BOT_TOKEN }}
|
||||||
repository: LedgerHQ/ethereum-plugin-sdk
|
repository: LedgerHQ/app-ethereum
|
||||||
|
|||||||
Reference in New Issue
Block a user