Skip to content

Commit

Permalink
Merge pull request #4 from NikodemMarek/layout-image-generation
Browse files Browse the repository at this point in the history
Layout image generation
  • Loading branch information
NikodemMarek authored Dec 9, 2023
2 parents 5d40c60 + 6e3bbd5 commit 74d1444
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/cheatsheet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: cheatsheet

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
cheatsheet:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: build docker image and generate cheatsheets
run: |
docker compose build
docker compose up
- name: commit cheatsheets
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add cheatsheets
git commit -m "update cheatsheet"
git push
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM alpine:latest

# install dependencies (curl, sudo, bash)
RUN apk --no-cache add curl sudo bash

# install zmk-viewer
RUN curl -sL https://raw.githubusercontent.com/MrMarble/zmk-viewer/master/scripts/install.sh | sudo -E bash -

WORKDIR /images
Binary file added cheatsheets/cradio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
cheatsheet-generator:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./config:/config
- ./cheatsheets:/images
command: sh -c "rm /images/*;
zmk-viewer generate cradio -f /config/*.keymap --single;"

0 comments on commit 74d1444

Please sign in to comment.