Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit a890ec8

Browse files
committed
add sleep + CI update
1 parent 6c12d03 commit a890ec8

File tree

4 files changed

+96
-70
lines changed

4 files changed

+96
-70
lines changed

.github/workflows/build.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: docker build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
branches:
8+
- master
9+
pull_request:
10+
branches:
11+
- '*'
12+
schedule:
13+
- cron: '0 7 1 * *'
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v1
24+
with:
25+
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v1
29+
30+
- name: Build
31+
uses: docker/build-push-action@v2

.github/workflows/dockerimage.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
- name: Prepare
16+
id: prepare
17+
run: |
18+
git fetch --prune --unshallow --tags
19+
20+
VERSION=$(git tag --points-at HEAD)
21+
VERSION=${VERSION//v}
22+
IMAGE_NAME=${GITHUB_REPOSITORY#*/}
23+
IMAGE_NAME="${{ secrets.DOCKERHUB_USER }}/${IMAGE_NAME//docker-}"
24+
IMAGE_TAGS="${IMAGE_NAME}:latest,${IMAGE_NAME}:${VERSION}"
25+
26+
echo "## :bookmark_tabs: Changes" >>"CHANGELOG.md"
27+
git log --pretty=format:"- %s %H%n" $(git describe --abbrev=0 --tags $(git describe --tags --abbrev=0)^)...$(git describe --tags --abbrev=0) >>"CHANGELOG.md"
28+
29+
echo ::set-output name=image_tags::${IMAGE_TAGS}
30+
echo ::set-output name=version::${VERSION}
31+
echo ::set-output name=changelog::${CHANGELOG}
32+
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@v1
35+
with:
36+
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v1
40+
41+
- name: Login to DockerHub
42+
uses: docker/login-action@v1
43+
with:
44+
username: ${{ secrets.DOCKERHUB_USER }}
45+
password: ${{ secrets.DOCKERHUB_TOKEN }}
46+
47+
- name: Build and Push
48+
uses: docker/build-push-action@v2
49+
with:
50+
push: true
51+
tags: ${{ steps.prepare.outputs.image_tags }}
52+
53+
- name: Create Release
54+
uses: actions/create-release@v1
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
with:
58+
tag_name: ${{ github.ref }}
59+
release_name: Release ${{ steps.prepare.outputs.version }}
60+
body_path: CHANGELOG.md
61+
draft: false
62+
prerelease: false

lirc_watcher.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
22

3-
import socket
43
import os
54
import paho.mqtt.client as paho
65
from threading import Timer
@@ -116,6 +115,9 @@ def send_code(priority_data=None):
116115
t = Timer(READ_TIMEOUT, send_code)
117116
t.start()
118117

118+
time.sleep(0.01)
119+
120+
119121
except KeyboardInterrupt:
120122
mqtt.disconnect()
121123
mqtt.loop_stop()

0 commit comments

Comments
 (0)