Skip to content

Commit

Permalink
feat(tgid): add tgid
Browse files Browse the repository at this point in the history
add tgid

Signed-off-by: kovacs <mritd@linux.com>
  • Loading branch information
mritd committed Jan 13, 2025
1 parent 0c293f8 commit 1a96970
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/tgid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: mritd/tgid

on:
schedule:
- cron: 0 23 * * 1
workflow_call:
workflow_dispatch:

jobs:
tgid:
uses: ./.github/workflows/.earthly.yaml
secrets: inherit
with:
build-dir: tgid
2 changes: 1 addition & 1 deletion .github/workflows/tuic-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: mritd/tuic-server

on:
schedule:
- cron: 0 23 * * 1
- cron: 0 0 * * 2
workflow_call:
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
| [![mritd/tuic-server](https://github.com/mritd/autobuild/actions/workflows/tuic-server.yaml/badge.svg)](https://github.com/mritd/autobuild/actions/workflows/tuic-server.yaml) | [https://hub.docker.com/r/mritd/tuic-server](https://hub.docker.com/r/mritd/tuic-server) |
| [![mritd/snell](https://github.com/mritd/autobuild/actions/workflows/snell.yaml/badge.svg)](https://github.com/mritd/autobuild/actions/workflows/snell.yaml) | [https://hub.docker.com/r/mritd/snell](https://hub.docker.com/r/mritd/snell) |
| [![mritd/ci-runner](https://github.com/mritd/autobuild/actions/workflows/ci-runner.yaml/badge.svg)](https://github.com/mritd/autobuild/actions/workflows/ci-runner.yaml) | [https://hub.docker.com/r/mritd/ci-runner](https://hub.docker.com/r/mritd/ci-runner) |
| [![mritd/tgid](https://github.com/mritd/autobuild/actions/workflows/tgid.yaml/badge.svg)](https://github.com/mritd/autobuild/actions/workflows/tgid.yaml) | [https://hub.docker.com/r/mritd/tgid](https://hub.docker.com/r/mritd/tgid) |


## Why not use Dockerfile?
Expand Down
30 changes: 30 additions & 0 deletions tgid/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
VERSION 0.8

build-tgid:
DO ../.udcs/image+GO
DO ../.udcs/os/alpine+UPGRADE
DO ../.udcs/os/alpine+INSTALL_BUILD_BASE

RUN --mount=type=cache,target=/go/pkg \
go install -trimpath -ldflags "-w -s" github.com/mritd/tgid@latest

SAVE ARTIFACT /go/bin/tgid

build:
FROM mritd/alpine

DO ../.udcs/os/alpine+TIMEZONE
DO ../.udcs/language/go+FIX_DNS

ENV BOT_TOKEN=""

BUILD +build-tgid

COPY +build-tgid/tgid /usr/bin/tgid

ENTRYPOINT ["tgid"]

SAVE IMAGE --push mritd/tgid:latest

all:
BUILD --platform=linux/amd64 --platform=linux/arm64 +build

0 comments on commit 1a96970

Please sign in to comment.