Add zmk field to workflows

This commit is contained in:
Manna Harbour 2022-04-01 10:24:50 +11:00
parent 2ce0d76dd7
commit 19b5e2a089
3 changed files with 28 additions and 4 deletions

View File

@ -36,8 +36,12 @@ on:
description: 'Kconfig'
required: false
default: 'default'
zmk:
description: 'ZMK'
required: false
default: 'default'
merge:
description: 'ZMK Merge'
description: 'Merge'
required: false
default: 'default'
jobs:
@ -52,6 +56,7 @@ jobs:
layers: ${{ steps.process-inputs.outputs.layers }}
mapping: ${{ steps.process-inputs.outputs.mapping }}
kconfig: ${{ steps.process-inputs.outputs.kconfig }}
zmk: ${{ steps.process-inputs.outputs.zmk }}
merge: ${{ steps.process-inputs.outputs.merge }}
steps:
- name: Process inputs
@ -70,6 +75,7 @@ jobs:
set-output "layers" "${{ github.event.inputs.layers }}"
set-output "mapping" "${{ github.event.inputs.mapping }}"
set-output "kconfig" "${{ github.event.inputs.kconfig }}"
set-output "zmk" "${{ github.event.inputs.zmk }}"
set-output "merge" "${{ github.event.inputs.merge }}"
build:
uses: manna-harbour/zmk-config/.github/workflows/main.yml@31a649e5571b4572d7010561dd3f191922cd9410
@ -83,4 +89,5 @@ jobs:
layers: ${{ needs.process-inputs.outputs.layers }}
mapping: ${{ needs.process-inputs.outputs.mapping }}
kconfig: ${{ needs.process-inputs.outputs.kconfig }}
zmk: ${{ needs.process-inputs.outputs.zmk }}
merge: ${{ needs.process-inputs.outputs.merge }}

View File

@ -29,6 +29,9 @@ on:
kconfig:
type: string
default: '["default"]'
zmk:
type: string
default: '["default"]'
merge:
type: string
default: '["default"]'
@ -49,6 +52,7 @@ jobs:
layers: ${{ fromJSON(inputs.layers) }}
mapping: ${{ fromJSON(inputs.mapping) }}
kconfig: ${{ fromJSON(inputs.kconfig) }}
zmk: ${{ fromJSON(inputs.zmk) }}
merge: ${{ fromJSON(inputs.merge) }}
steps:
- name: Checkout
@ -140,16 +144,25 @@ jobs:
run: |
mkdir -p `dirname "config/${{ env.outboard_to }}"`
ln -sr ${{ steps.variables.outputs.outboard_chekout_dir }}/${{ env.outboard_from }} config/${{ env.outboard_to }}
- name: Generate outboard manifest
- name: Generate manifest from outboard
if: ${{ env.outboard_url_base != '' && env.outboard_revision != '' }}
run: |
echo "manifest:\n remotes:\n - name: outboard\n url-base: ${{ env.outboard_url_base }}\n projects:\n - name: zmk\n remote: outboard\n revision: ${{ env.outboard_revision }}\n import: app/west.yml\n self:\n path: config" > config/west.yml
cat config/west.yml
- name: Copy outboard manifest
- name: Copy manifest from outboard
if: ${{ env.outboard_manifest != '' }}
run: |
cp ${{ steps.variables.outputs.outboard_chekout_dir }}/${{ env.outboard_manifest }} config/west.yml
cat config/west.yml
- name: Generate manifest from zmk field
if: ${{ matrix.zmk != '' && matrix.zmk != 'default' }}
run: |
user=`echo ${{ matrix.zmk }} | cut -f 1 -d '/'`
repo=`echo ${{ matrix.zmk }} | cut -f 2 -d '/'`
branch=`echo ${{ matrix.zmk }} | cut -f 3- -d '/'`
remote="$user-$repo"
echo "manifest:\n remotes:\n - name: $remote\n url-base: https://github.com/$user\n projects:\n - name: zmk\n remote: $remote\n repo-path: $repo\n revision: $branch\n import: app/west.yml\n self:\n path: config" > config/west.yml
cat config/west.yml
- name: Cache
if: true
uses: actions/cache@v2

View File

@ -63,6 +63,8 @@ See the Test All workflow files for all supported values for each option.
The ~kconfig~ option can be used to for [[#kconfig-configuration][Kconfig configuration]]. Join multiple lines with ~\n~.
The ~zmk~ option can be used to build from an alternative ZMK branch. The branch is specified as ~<user>/<repo>/<branch>~.
The ~merge~ option can be used to merge branches into ZMK at build time. Branches are specified as ~<user>/<repo>/<branch>~. To merge multiple branches, separate with space.
@ -80,7 +82,9 @@ The ~Miryoku Alphas~, ~Miryoku Nav~, ~Miryoku Clipboard~, and ~Miryoku Layers~ o
The ~Kconfig~ option can be used to for [[#kconfig-configuration][Kconfig configuration]]. Join multiple lines with ~\n~.
The ~ZMK Merge~ option can be used to merge branches into ZMK at build time. Branches are specified as ~<user>/<repo>/<branch>~. To merge multiple branches, separate with space.
The ~ZMK~ option can be used to build from an alternative ZMK branch. The branch is specified as ~<user>/<repo>/<branch>~.
The ~Merge~ option can be used to merge branches into ZMK at build time. Branches are specified as ~<user>/<repo>/<branch>~. To merge multiple branches, separate with space.
** Supported Keyboards