mirror of
https://codeberg.org/icewind/tasproxy.git
synced 2026-06-03 18:24:08 +02:00
bumb dependencies + docker ci
This commit is contained in:
parent
0d5a00f269
commit
2bfffb9434
4 changed files with 233 additions and 331 deletions
27
.github/workflows/docker.yaml
vendored
Normal file
27
.github/workflows/docker.yaml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: docker-build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'master'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: icewind1991/tasproxy:latest
|
||||||
|
- name: Image digest
|
||||||
|
run: echo ${{ steps.docker_build.outputs.digest }}
|
||||||
521
Cargo.lock
generated
521
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,10 +7,10 @@ license = "MIT OR Apache-2.0"
|
||||||
repository = "https://github.com/icewind1991/tasproxy"
|
repository = "https://github.com/icewind1991/tasproxy"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rumqttc = "0.5"
|
rumqttc = "0.8"
|
||||||
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
|
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
dashmap = "3"
|
dashmap = "4"
|
||||||
json = "0.12"
|
json = "0.12"
|
||||||
warp = "0.3"
|
warp = "0.3"
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
|
|
|
||||||
12
src/topic.rs
12
src/topic.rs
|
|
@ -35,22 +35,18 @@ impl From<&str> for Topic {
|
||||||
fn parse_topic() {
|
fn parse_topic() {
|
||||||
let device = Device {
|
let device = Device {
|
||||||
hostname: "hostname".to_string(),
|
hostname: "hostname".to_string(),
|
||||||
topic: "foo".to_string(),
|
|
||||||
};
|
};
|
||||||
assert_eq!(
|
assert_eq!(Topic::LWT(device.clone()), Topic::from("tele/hostname/LWT"));
|
||||||
Topic::LWT(device.clone()),
|
|
||||||
Topic::from("tele/foo/hostname/LWT")
|
|
||||||
);
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
Topic::State(device.clone()),
|
Topic::State(device.clone()),
|
||||||
Topic::from("tele/foo/hostname/STATE")
|
Topic::from("tele/hostname/STATE")
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
Topic::Sensor(device.clone()),
|
Topic::Sensor(device.clone()),
|
||||||
Topic::from("tele/foo/hostname/SENSOR")
|
Topic::from("tele/hostname/SENSOR")
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
Topic::Result(device.clone()),
|
Topic::Result(device.clone()),
|
||||||
Topic::from("stat/foo/hostname/RESULT")
|
Topic::from("stat/hostname/RESULT")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue