Skip to content

Commit 23a1ab1

Browse files
authored
feat: add tqm (#623)
1 parent 7165bec commit 23a1ab1

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

apps/tqm/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM docker.io/library/golang:1.24-alpine AS builder
4+
ARG VERSION
5+
6+
USER root
7+
WORKDIR /app
8+
9+
RUN apk add --no-cache git \
10+
&& git clone --single-branch --branch "${VERSION}" https://github.com/autobrr/tqm.git . \
11+
&& go mod download \
12+
&& \
13+
CGO_ENABLED=0 go build \
14+
-trimpath \
15+
-ldflags "-s -w -X github.com/autobrr/tqm/runtime.Version=${VERSION}" \
16+
-o tqm ./cmd/tqm
17+
18+
FROM scratch
19+
COPY --from=builder /app/tqm /tqm
20+
ENTRYPOINT ["/tqm"]

apps/tqm/docker-bake.hcl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
target "docker-metadata-action" {}
2+
3+
variable "APP" {
4+
default = "tqm"
5+
}
6+
7+
variable "VERSION" {
8+
// renovate: datasource=github-releases depName=autobrr/tqm
9+
default = "v1.15.0"
10+
}
11+
12+
variable "SOURCE" {
13+
default = "https://github.com/autobrr/tqm"
14+
}
15+
16+
group "default" {
17+
targets = ["image-local"]
18+
}
19+
20+
target "image" {
21+
inherits = ["docker-metadata-action"]
22+
args = {
23+
VERSION = "${VERSION}"
24+
}
25+
labels = {
26+
"org.opencontainers.image.source" = "${SOURCE}"
27+
}
28+
}
29+
30+
target "image-local" {
31+
inherits = ["image"]
32+
output = ["type=docker"]
33+
tags = ["${APP}:${VERSION}"]
34+
}
35+
36+
target "image-all" {
37+
inherits = ["image"]
38+
platforms = [
39+
"linux/amd64",
40+
"linux/arm64"
41+
]
42+
}

apps/tqm/tests.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
schemaVersion: "2.0.0"
3+
fileExistenceTests:
4+
- name: tqm
5+
path: /tqm
6+
shouldExist: true

0 commit comments

Comments
 (0)