mirror of https://github.com/zmkfirmware/zmk.git
parent
8feeb52eaf
commit
df2e979d7e
|
|
@ -30,17 +30,28 @@ jobs:
|
||||||
name: Fetch Build Keyboards
|
name: Fetch Build Keyboards
|
||||||
outputs:
|
outputs:
|
||||||
build_matrix: ${{ env.build_matrix }}
|
build_matrix: ${{ env.build_matrix }}
|
||||||
|
has_valid_build_matrix: ${{ steps.fetch.outputs.has_valid_build_matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Fetch Build Matrix
|
- name: Fetch Build Matrix
|
||||||
|
id: fetch
|
||||||
run: |
|
run: |
|
||||||
echo "build_matrix=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')" >> $GITHUB_ENV
|
matrix_content=$(yq -oj -I0 '${{ inputs.build_matrix_path }}')
|
||||||
yq -oj "${{ inputs.build_matrix_path }}"
|
|
||||||
|
if [ -z "$matrix_content" ] || [ "$matrix_content" = "null" ]; then
|
||||||
|
echo "::notice file=${{inputs.build_matrix_path}},title=Empty build matrix file::To add a keyboard to the build, see https://zmk.dev/docs/user-setup#add-a-keyboard."
|
||||||
|
echo "has_valid_build_matrix=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "build_matrix=$matrix_content" >> $GITHUB_ENV
|
||||||
|
echo "has_valid_build_matrix=true" >> $GITHUB_OUTPUT
|
||||||
|
echo "$matrix_content"
|
||||||
|
fi
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: needs.matrix.outputs.has_valid_build_matrix == 'true'
|
||||||
container:
|
container:
|
||||||
image: zmkfirmware/zmk-build-arm:stable
|
image: zmkfirmware/zmk-build-arm:stable
|
||||||
needs: matrix
|
needs: matrix
|
||||||
|
|
@ -213,6 +224,7 @@ jobs:
|
||||||
|
|
||||||
merge:
|
merge:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: needs.matrix.outputs.has_valid_build_matrix == 'true'
|
||||||
needs: build
|
needs: build
|
||||||
name: Merge Output Artifacts
|
name: Merge Output Artifacts
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue