Skip to content

Commit

Permalink
Merge pull request #11 from penguineer/release-preparations
Browse files Browse the repository at this point in the history
Release preparations
  • Loading branch information
penguineer authored Apr 8, 2022
2 parents 573114f + a9bef84 commit c746371
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ name: Docker Image CI

on:
push:
branches: [ main ]
branches:
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'main'

jobs:
docker:
Expand All @@ -11,13 +17,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: mrtux/pingboard-daemon
tags: |
# 1.2.3
type=semver,pattern={{version}}
# disabled if major zero
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
# generate lates from default branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand All @@ -28,5 +48,6 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: mrtux/pingboard-daemon:latest
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Create release

on:
push:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
build:
name: "🚀 Release"
runs-on: ubuntu-18.04
steps:
- name: "📥 Check-out"
uses: actions/checkout@v1
- name: "✏️ Generate release changelog"
id: generate-release-changelog
uses: ./
with:
token: ${{ secrets.CHANGELOG_TOKEN }}
onlyLastTag: "true"
stripHeaders: "true"
stripGeneratorNotice: "true"
- name: "🚀 Create GitHub release"
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.generate-release-changelog.outputs.changelog }}
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ A daemon that connects to a [PingBoard](https://github.com/PingTechGmbH/PingBoar
sends key presses and accepts configuration via [RabbitMQ](https://www.rabbitmq.com/). The main goal is to enable the
PingBoard as an IoT input device and execute actions outside the USB host.

Features:
* Emits AMQP messages on Pingboard key press.
* Configures Pingboard (Brightness, Key LED colors, Blinking) with AMQP messages.
* Detects PingBoard via evdev and grabs it to prevent rogue inputs to other applications.
* Reconnects when connections to RabbitMQ or Pingboard are lost. Can also be started without Pingboard present.
* Current state is pushed to the configuration queue when finishing, so that it can be retrieved on the next run.
* Runs out of an unprivileged Docker container.

## Table of Contents

- [Usage](#usage)
Expand All @@ -20,6 +28,8 @@ PingBoard as an IoT input device and execute actions outside the USB host.

## Usage

### Run with Docker

Deployment via Docker is not trivial, as the daemon needs access to USB (evdev and serial).

With the configuration stored in a file `.env`, the daemon can be started as follows:
Expand Down

0 comments on commit c746371

Please sign in to comment.