diff --git a/.github/workflows/Example.yml b/.github/workflows/Example.yml index 99210917..ee8f8938 100644 --- a/.github/workflows/Example.yml +++ b/.github/workflows/Example.yml @@ -88,6 +88,8 @@ jobs: git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}@users.noreply.github.com" git config --global core.autocrlf false + git pull + git reset git add ${{ env.EXAMPLES_PATH }}/${{ matrix.file-name }}* git commit -m "${{ env.CI_COMMIT_MESSAGE }}" git push origin examples || (git reset --soft HEAD~1 && (exit 1)) @@ -110,7 +112,7 @@ jobs: if: success() && github.event_name != 'pull_request' && github.ref_name == 'main' uses: nick-fields/retry@v3 env: - CI_COMMIT_MESSAGE: pluto-examples[${{ github.ref }}] + CI_COMMIT_MESSAGE: pluto-examples[${{ github.ref_name }}] CI_COMMIT_AUTHOR: github-actions[bot] EXAMPLES_PATH: examples/pluto-src # Fetch all and clear the stash list. Include all files from the examples folder to the stash and switch the branch. @@ -135,6 +137,7 @@ jobs: git config --global user.email "${{ env.CI_COMMIT_AUTHOR }}@users.noreply.github.com" git config --global core.autocrlf false git pull + git reset git add ${{ env.EXAMPLES_PATH }} git commit -m "${{ env.CI_COMMIT_MESSAGE }}" git push origin examples || (git reset --soft HEAD~1 && (exit 1))