From 99e0caf3495d2894d4e02256768d6184ad616c49 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 23 Jan 2024 17:06:22 -0500 Subject: [PATCH] improved convention --- .github/workflows/build-firmware.yaml | 27 +++++++++++++++++-- .../workflows/update-rusefi-reference.yaml | 2 ++ board.mk | 1 - meta-info.env | 1 + 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 meta-info.env diff --git a/.github/workflows/build-firmware.yaml b/.github/workflows/build-firmware.yaml index d602f86..bca524e 100644 --- a/.github/workflows/build-firmware.yaml +++ b/.github/workflows/build-firmware.yaml @@ -1,16 +1,39 @@ name: Create Board Firmware on: + schedule: + - cron: '10 17 * * *' # build fresh every 5:10 PM push: pull_request: workflow_dispatch: jobs: + read-meta-info: + runs-on: ubuntu-latest + outputs: + short_board_name: ${{ steps.read_meta.outputs.SHORT_BOARD_NAME }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Read meta-info file with the board description + id: read_meta + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + run: | + echo "$(cat ./meta-info.env)" >> $GITHUB_OUTPUT + + - name: Debug output of the board name + run: | + echo "SHORT_BOARD_NAME = ${{ steps.read_meta.outputs.SHORT_BOARD_NAME }}" + call-workflow-passing-data: + needs: read-meta-info uses: rusefi/rusefi/.github/workflows/custom-board-build.yaml@master secrets: inherit permissions: contents: write with: - shortBoardName: core8 - iniFileName: rusefi_core8.ini + shortBoardName: ${{ needs.read-meta-info.outputs.SHORT_BOARD_NAME }} + rusefi_dir: ext/rusefi + relative_board_dir: ../.. diff --git a/.github/workflows/update-rusefi-reference.yaml b/.github/workflows/update-rusefi-reference.yaml index 9563834..8366d46 100644 --- a/.github/workflows/update-rusefi-reference.yaml +++ b/.github/workflows/update-rusefi-reference.yaml @@ -1,6 +1,8 @@ name: Update rusEFI Reference on: + schedule: + - cron: '5 17 * * *' # update rusEFI reference daily at 5:05 pm workflow_dispatch: jobs: diff --git a/board.mk b/board.mk index 247c01c..ae8e24e 100644 --- a/board.mk +++ b/board.mk @@ -1,6 +1,5 @@ BOARDCPPSRC = $(BOARD_DIR)/board_configuration.cpp -DDEFS += -DFIRMWARE_ID=\"core8\" SHORT_BOARD_NAME=core8 # assign critical LED to a non-existent pin if you do not have it on your board diff --git a/meta-info.env b/meta-info.env new file mode 100644 index 0000000..a748d89 --- /dev/null +++ b/meta-info.env @@ -0,0 +1 @@ +SHORT_BOARD_NAME=core8