Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout image generation #4

Merged
merged 8 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;"
Loading