From bf9a3492cb49d406050e09ea262abd3841c8d224 Mon Sep 17 00:00:00 2001 From: rusEFI LLC Date: Tue, 7 May 2024 12:31:47 -0400 Subject: [PATCH] only:Add Config to Commit Regardless of firmware build status --- .../workflows/custom-board-build/action.yaml | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/custom-board-build/action.yaml b/.github/workflows/custom-board-build/action.yaml index 020387ab8d..6aab56c4f9 100644 --- a/.github/workflows/custom-board-build/action.yaml +++ b/.github/workflows/custom-board-build/action.yaml @@ -203,12 +203,37 @@ runs: echo "Not a repository" fi + - name: Git Config + if: ${{ inputs.push == 'true' }} + shell: bash + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub git update Action" + - name: Handle configs separately just to make github logs more readable working-directory: ${{inputs.rusefi_dir}}/firmware shell: bash run: | bash bin/compile.sh $BOARD_META_PATH config + - name: Add Config to Commit Regardless of firmware build status + if: ${{ inputs.push == 'true' }} + shell: bash + run: | + git add ${{inputs.rusefi_dir}}/firmware/${META_OUTPUT_ROOT_FOLDER}* + OUT=$(git commit -m "Auto-generated Configs" -m "[no ci]" 2>&1) || echo "commit failed, finding out why" + if echo "$OUT" | grep 'nothing to commit'; then + echo "Configs: looks like nothing to commit" + exit 0 + fi + git status + + - name: Push Configs + if: ${{ inputs.push == 'true' }} + uses: ad-m/github-push-action@master + with: + github_token: ${{env.TOKEN}} + - name: Building simulator separately just to make github logs more readable working-directory: ${{inputs.rusefi_dir}}/firmware shell: bash @@ -249,13 +274,6 @@ runs: ls ${{inputs.sim_output}} fi - - name: Git Config - if: ${{ inputs.push == 'true' }} - shell: bash - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub git update Action" - - name: Add Tune to Commit if: ${{ inputs.run_simulator == 'true' && inputs.push == 'true' }} shell: bash