Skip to content

Use qmk container

Use qmk container #54

Workflow file for this run

name: QMK firmware build
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
container: qmkfm/qmk_cli
steps:
- name: Disable git safe directory checks
run: git config --global --add safe.directory '*'
- name: Checkout QMK
uses: actions/checkout@v3
with:
repository: qmk/qmk_firmware
submodules: recursive
persist-credentials: false
- name: Checkout userspace
uses: actions/checkout@v3
with:
path: ${{ github.actor }}
persist-credentials: false
- name: Symlink keymap from userspace to qmk directory
run: ln -s ../../../${{ github.actor }}/keymap keyboards/kinesis/keymaps/${{ github.actor }}
- name: Build firmware
run: |
mkdir dist
qmk compile -kb kinesis/stapelberg -km ${{ github.actor }}
qmk c2json -kb kinesis/stapelberg -km hadynz keyboards/kinesis/keymaps/${{ github.actor }}/keymap.c > dist/keymap.json
- name: Install python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install pipx
uses: CfirTsabari/actions-pipx@v1
- name: Install keymap-drawer
run: pip install --user keymap-drawer
- name: Draw keymap and package
run: |
keymap parse -c 10 -q dist/keymap.json > keymap.yaml
keymap draw dist/keymap.yaml > dist/keymap.svg
find dist
# - name: Rename firmware files with run number
# run: |
# for file in *.hex; do mv $file ${file%.hex}_${{ github.run_number }}.hex; done
# - name: Archive firmware
# uses: actions/upload-artifact@v3
# continue-on-error: true
# with:
# name: kinesis_${{ github.actor }}_qmk_keymap_${{ github.run_number }}
# path: |
# *.hex