Skip to content

Removed "untested" note from README #32

Removed "untested" note from README

Removed "untested" note from README #32

Workflow file for this run

on:
push:
branches:
- holyiot
paths-ignore:
- '**/README.md'
- '**/LICENSE'
pull_request:
branches:
- holyiot
paths-ignore:
- '**/README.md'
- '**/LICENSE'
workflow_dispatch:
paths-ignore:
- '**/README.md'
- '**/LICENSE'
env:
DOCKER_USER_OPTION: '$UID:$GID'
name: Build
jobs:
generate:
runs-on: ubuntu-latest
name: Generate
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
- uses: xanantis/docker-file-ownership-fix@v1
- name: Run build script
run: |
chmod +x build.sh
./build.sh
shell: bash
- name: Persist gerbers
uses: actions/upload-artifact@v3.1.2
with:
name: Jorian840_gerbers
path: gerbers
- name: Persist images
uses: actions/upload-artifact@v3.1.2
with:
name: Jorian840_images
path: images
- name: Persist case files
uses: actions/upload-artifact@v3.1.2
with:
name: Jorian840_case_files
path: dxf
image_matrix:
runs-on: ubuntu-latest
name: PCB image matrix
needs: generate
outputs:
matrix: ${{ steps.setmatrix.outputs.matrix }}
steps:
- uses: actions/download-artifact@master
with:
name: Jorian840_images
path: images
- id: setmatrix
run: |
matrixArray=$(find ./images -name 'pcb*.png' | xargs -n 1 -i echo {} {} | sed 's# .*/# #') # Creates array of all image files
# Start Generate JSON String
echo "$matrixArray" | \
jq --slurp --raw-input 'split("\n")[:-1] | map(split(" "))' | \
jq "map({\"filepath\": (.[0]), \"basename\": .[1] })" | \
jq -sc "{ \"include\": .[] }" > tmp
cat ./tmp
# End Generate JSON String
matrixStringifiedObject=$(cat ./tmp) # Use this as jq @sh wasn't cooperating
echo "matrix=$matrixStringifiedObject" >> $GITHUB_OUTPUT
gerber_matrix:
runs-on: ubuntu-latest
name: Gerber matrix
needs: generate
outputs:
matrix: ${{ steps.setmatrix.outputs.matrix }}
steps:
- uses: actions/download-artifact@master
with:
name: Jorian840_gerbers
path: gerbers
- id: setmatrix
run: |
matrixArray=$(find ./gerbers -name '*.zip' | xargs -n 1 -i echo {} {} | sed 's# .*/# #') # Creates array of all gerber files
# Start Generate JSON String
echo "$matrixArray" | \
jq --slurp --raw-input 'split("\n")[:-1] | map(split(" "))' | \
jq "map({\"filepath\": (.[0]), \"basename\": .[1] })" | \
jq -sc "{ \"include\": .[] }" > tmp
cat ./tmp
# End Generate JSON String
matrixStringifiedObject=$(cat ./tmp) # Use this as jq @sh wasn't cooperating
echo "matrix=$matrixStringifiedObject" >> $GITHUB_OUTPUT
upload_gerbers:
runs-on: ubuntu-latest
name: Upload gerbers
needs: [generate, gerber_matrix]
strategy:
matrix: ${{fromJson(needs.gerber_matrix.outputs.matrix)}}
steps:
- uses: actions/download-artifact@master
with:
name: Jorian840_gerbers
path: gerbers
- name: Gets latest created release info
id: latest_release_info
uses: jossef/action-latest-release-info@v1.2.1
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload gerbers
uses: shogo82148/actions-upload-release-asset@v1.6.4
env:
GITHUB_TOKEN: ${{ github.token }}
with:
overwrite: true
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ${{ matrix.filepath }}
asset_name: ${{ matrix.basename }}
upload_images:
runs-on: ubuntu-latest
name: Upload images
needs: [generate, image_matrix]
strategy:
matrix: ${{fromJson(needs.image_matrix.outputs.matrix)}}
steps:
- uses: actions/download-artifact@master
with:
name: Jorian840_images
path: images
- name: Gets latest created release info
id: latest_release_info
uses: jossef/action-latest-release-info@v1.2.1
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload images
uses: shogo82148/actions-upload-release-asset@v1.6.4
env:
GITHUB_TOKEN: ${{ github.token }}
with:
overwrite: true
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ${{ matrix.filepath }}
asset_name: ${{ matrix.basename }}
upload_case_files:
runs-on: ubuntu-latest
name: Upload case DXF files
needs: generate
steps:
- uses: actions/download-artifact@master
with:
name: Jorian840_case_files
path: dxf
- name: Gets latest created release info
id: latest_release_info
uses: jossef/action-latest-release-info@v1.2.1
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload case files
uses: shogo82148/actions-upload-release-asset@v1.6.4
env:
GITHUB_TOKEN: ${{ github.token }}
with:
overwrite: true
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
asset_path: ./dxf/case_files.zip
asset_name: case_files.zip