From 55c406abdb39523b9202f55e966f7cddfddf10dc Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Sun, 3 Mar 2024 08:33:16 -0600 Subject: [PATCH 1/3] Use action from submodule --- .github/workflows/build-firmware.yaml | 31 ++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-firmware.yaml b/.github/workflows/build-firmware.yaml index f753122..b8dbc1b 100644 --- a/.github/workflows/build-firmware.yaml +++ b/.github/workflows/build-firmware.yaml @@ -8,8 +8,29 @@ on: workflow_dispatch: jobs: - call-workflow-passing-data: - uses: rusefi/rusefi/.github/workflows/custom-board-build.yaml@master - secrets: inherit - permissions: - contents: write + build-firmware: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Set bundle upload + id: set-upload + run: | + if [ "${{github.event_name}}" == "push" -o "${{github.event_name}}" == "schedule" -o "${{github.event_name}}" == "workflow_dispatch" ] && [ "${{github.ref}}" == "refs/heads/master" -o "${{github.ref}}" == "refs/heads/main" ]; then + echo 'upload="bundles"' >> $GITHUB_OUTPUT + fi + + - uses: ./ext/rusefi/.github/workflows/custom-board-build + with: + artifacts: bin srec hex list map elf bundle autoupdate + uploads: ini ${{steps.set-upload.outputs.upload}} + MY_REPO_PAT: ${{secrets.MY_REPO_PAT}} + RUSEFI_ONLINE_FTP_USER: ${{secrets.RUSEFI_ONLINE_FTP_USER}} + RUSEFI_ONLINE_FTP_PASS: ${{secrets.RUSEFI_ONLINE_FTP_PASS}} + RUSEFI_FTP_SERVER: ${{secrets.RUSEFI_FTP_SERVER}} + RUSEFI_SSH_SERVER: ${{secrets.RUSEFI_SSH_SERVER}} + RUSEFI_SSH_USER: ${{secrets.RUSEFI_SSH_USER}} + RUSEFI_SSH_PASS: ${{secrets.RUSEFI_SSH_PASS}} + ADDITIONAL_ENV: ${{secrets.ADDITIONAL_ENV}} From 6aa779df14c0e721ee8ef6b7a5efd97f51f28ecd Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Thu, 7 Mar 2024 20:08:04 -0600 Subject: [PATCH 2/3] check out master --- ext/rusefi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/rusefi b/ext/rusefi index 01c9204..24d8cd2 160000 --- a/ext/rusefi +++ b/ext/rusefi @@ -1 +1 @@ -Subproject commit 01c9204c695523a741e9aed1f880eb7768481fe1 +Subproject commit 24d8cd29e198bd8e77cae6cfabe9983e3d17a95f From e9422fc9afccb0c3199f7439530df7116c6e3e09 Mon Sep 17 00:00:00 2001 From: David Holdeman Date: Thu, 7 Mar 2024 20:16:13 -0600 Subject: [PATCH 3/3] don't push all the time --- .github/workflows/build-firmware.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-firmware.yaml b/.github/workflows/build-firmware.yaml index b8dbc1b..788f887 100644 --- a/.github/workflows/build-firmware.yaml +++ b/.github/workflows/build-firmware.yaml @@ -15,17 +15,20 @@ jobs: with: submodules: true - - name: Set bundle upload - id: set-upload + - name: Set run variables + id: set-variables run: | if [ "${{github.event_name}}" == "push" -o "${{github.event_name}}" == "schedule" -o "${{github.event_name}}" == "workflow_dispatch" ] && [ "${{github.ref}}" == "refs/heads/master" -o "${{github.ref}}" == "refs/heads/main" ]; then echo 'upload="bundles"' >> $GITHUB_OUTPUT + else + echo 'push="false"' >> $GITHUB_OUTPUT fi - uses: ./ext/rusefi/.github/workflows/custom-board-build with: artifacts: bin srec hex list map elf bundle autoupdate - uploads: ini ${{steps.set-upload.outputs.upload}} + uploads: ini ${{steps.set-variables.outputs.upload}} + push: ${{ steps.set-variables.outputs.push }} MY_REPO_PAT: ${{secrets.MY_REPO_PAT}} RUSEFI_ONLINE_FTP_USER: ${{secrets.RUSEFI_ONLINE_FTP_USER}} RUSEFI_ONLINE_FTP_PASS: ${{secrets.RUSEFI_ONLINE_FTP_PASS}}