Build Inputs #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2022 Manna Harbour | |
# https://github.com/manna-harbour/miryoku | |
name: 'Build Inputs' | |
on: | |
workflow_dispatch: | |
inputs: | |
board: | |
description: 'board' | |
required: true | |
shield: | |
description: 'shield' | |
required: false | |
default: 'default' | |
alphas: | |
description: 'alphas' | |
required: false | |
default: 'default' | |
type: choice | |
options: | |
- "default" | |
- "AZERTY" | |
- "BEAKL15" | |
- "Colemak" | |
- "ColemakDHK" | |
- "Dvorak" | |
- "Halmak" | |
- "QWERTY" | |
- "QWERTZ" | |
- "Workman" | |
nav: | |
description: 'nav' | |
required: false | |
default: 'default' | |
type: choice | |
options: | |
- "default" | |
- "invertedT" | |
- "vi" | |
layers: | |
description: 'layers' | |
required: false | |
default: 'default' | |
type: choice | |
options: | |
- "default" | |
- "flip" | |
mapping: | |
description: 'mapping' | |
required: false | |
default: 'default' | |
custom_config: | |
description: 'custom_config' | |
required: false | |
default: 'default' | |
kconfig: | |
description: 'kconfig' | |
required: false | |
default: 'default' | |
branches: | |
description: 'branches' | |
required: false | |
default: 'default' | |
modules: | |
description: 'modules' | |
required: false | |
default: 'default' | |
jobs: | |
process-inputs: | |
runs-on: ubuntu-latest | |
outputs: | |
board: ${{ steps.process-inputs.outputs.board }} | |
shield: ${{ steps.process-inputs.outputs.shield }} | |
alphas: ${{ steps.process-inputs.outputs.alphas }} | |
nav: ${{ steps.process-inputs.outputs.nav }} | |
layers: ${{ steps.process-inputs.outputs.layers }} | |
mapping: ${{ steps.process-inputs.outputs.mapping }} | |
custom_config: ${{ steps.process-inputs.outputs.custom_config }} | |
kconfig: ${{ steps.process-inputs.outputs.kconfig }} | |
branches: ${{ steps.process-inputs.outputs.branches }} | |
modules: ${{ steps.process-inputs.outputs.modules }} | |
steps: | |
- name: Process inputs | |
id: process-inputs | |
run: | | |
set-output() | |
{ | |
json=`echo "$2" | jq -cnR 'inputs | split(",";"")'` | |
echo "$1=$json" >> $GITHUB_OUTPUT | |
} | |
set-output "board" "${{ github.event.inputs.board }}" | |
set-output "shield" "${{ github.event.inputs.shield }}" | |
set-output "alphas" "${{ github.event.inputs.alphas }}" | |
set-output "nav" "${{ github.event.inputs.nav }}" | |
set-output "layers" "${{ github.event.inputs.layers }}" | |
set-output "mapping" "${{ github.event.inputs.mapping }}" | |
set-output "custom_config" "${{ github.event.inputs.custom_config }}" | |
set-output "kconfig" "${{ github.event.inputs.kconfig }}" | |
set-output "branches" "${{ github.event.inputs.branches }}" | |
set-output "modules" "${{ github.event.inputs.modules }}" | |
build: | |
uses: ./.github/workflows/main.yml | |
secrets: inherit | |
needs: process-inputs | |
with: | |
board: ${{ needs.process-inputs.outputs.board }} | |
shield: ${{ needs.process-inputs.outputs.shield }} | |
alphas: ${{ needs.process-inputs.outputs.alphas }} | |
nav: ${{ needs.process-inputs.outputs.nav }} | |
layers: ${{ needs.process-inputs.outputs.layers }} | |
mapping: ${{ needs.process-inputs.outputs.mapping }} | |
custom_config: ${{ needs.process-inputs.outputs.custom_config }} | |
kconfig: ${{ needs.process-inputs.outputs.kconfig }} | |
branches: ${{ needs.process-inputs.outputs.branches }} | |
modules: ${{ needs.process-inputs.outputs.modules }} |