From 9430fa4b1428b39cde78182a57829b0895ae299e Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sat, 21 May 2022 12:18:06 -0400 Subject: [PATCH] progress --- .github/workflows/create-board.yaml | 28 +++++++++++++++++++++------- step2_copy_with_docker.sh | 20 -------------------- step3_create_board_with_docker.sh | 11 ----------- 3 files changed, 21 insertions(+), 38 deletions(-) delete mode 100755 step2_copy_with_docker.sh delete mode 100755 step3_create_board_with_docker.sh diff --git a/.github/workflows/create-board.yaml b/.github/workflows/create-board.yaml index 27e2717c5..1c68a352c 100644 --- a/.github/workflows/create-board.yaml +++ b/.github/workflows/create-board.yaml @@ -1,6 +1,6 @@ name: Check All -on: [push, pull_request] +on: [ push, pull_request ] jobs: build-firmware: @@ -13,12 +13,26 @@ jobs: - name: 1. Build Docker run: | - bash step1_build_hellen-one_docker.sh + bash hellen-one/bin/step1_build_hellen-one_docker.sh - name: 2. Copy run: | - bash step2_copy_with_docker.sh - -# - name: 3. Create Board -# run: | -# bash step3_create_board_with_docker.sh + bash hellen-one/bin/step2_copy_with_docker.sh + + - name: 3. Create Board + run: | + bash hellen-one/bin/step3_create_board_with_docker.sh + + - name: Commit fresh board files + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + run: | + bash hellen-one/bin/gha-commit.sh + + - name: Push board files + if: ${{env.NOCOMMIT != 'true'}} + uses: ad-m/github-push-action@master + with: + github_token: ${{ github.token }} + branch: ${{ steps.extract_branch.outputs.branch }} + diff --git a/step2_copy_with_docker.sh b/step2_copy_with_docker.sh deleted file mode 100755 index 83a3c4c46..000000000 --- a/step2_copy_with_docker.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -if [ ! -f hellen-one/git_scripts ]; then - echo "No submodules?" - git submodule update --init --recursive -fi - - -# This command is me trying to be fancy -# '--entrypoint python3' skips the normal container CMD and starts python3 instead -# using the parameters specified after 'hellen-one' -# -# -v "$(pwd)":/${PWD##*/} simply mounts the current working directory -# at / -# -# '/${PWD##*/}' is doing the $pwd basename thing again - -docker run --rm -t --user $(id -u):$(id -g) --entrypoint python3 -v "$(pwd)":/${PWD##*/} hellen-one ./bin/copy_from_Kicad.py "frames:alphax_" "/${PWD##*/}" "../../gerber" "4ch" "b" - -echo "Done!" diff --git a/step3_create_board_with_docker.sh b/step3_create_board_with_docker.sh deleted file mode 100755 index eb0d5659f..000000000 --- a/step3_create_board_with_docker.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -if [ ! -f hellen-one/git_scripts ]; then - echo "No submodules?" - git submodule update --init --recursive -fi - -# See step2_copy_with_docker.sh for explanation of the following command - -docker run --rm -t --user $(id -u):$(id -g) --entrypoint bash -v "$(pwd)":/${PWD##*/} hellen-one ./bin/create_board_with_prefix.sh "alphax_" "/${PWD##*/}" "4ch" "b" "bom_replace_alphax-4ch-b.csv " "0,4" -