Skip to content

Commit e21aeca

Browse files
committed
build docker
1 parent c5fb186 commit e21aeca

3 files changed

Lines changed: 29 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,23 @@ jobs:
1212
goreleaser:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
1818
- run: git fetch --force --tags
19-
- uses: actions/setup-go@v4
19+
- uses: actions/setup-go@v5
2020
with:
2121
go-version: 1.21.x
22-
- uses: goreleaser/goreleaser-action@v4
22+
- uses: docker/setup-qemu-action@v3
23+
- uses: docker/setup-buildx-action@v3
24+
- uses: docker/login-action@v3
25+
with:
26+
username: singee
27+
password: ${{ secrets.DOCKER_TOKEN }}
28+
- uses: goreleaser/goreleaser-action@v6
2329
with:
2430
distribution: goreleaser
25-
version: latest
31+
version: '~> v2'
2632
args: release --clean
2733
env:
2834
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
version: 2
12
before:
23
hooks:
34
- go mod tidy
45
builds:
56
- main: ./cmd/kitty
7+
binary: kitty
68
env:
79
- CGO_ENABLED=0
810
goos:
@@ -19,6 +21,16 @@ builds:
1921
- -X github.com/ImSingee/kitty/internal/version.version={{.Version}}
2022
- -X github.com/ImSingee/kitty/internal/version.commit={{.Commit}}
2123
- -X github.com/ImSingee/kitty/internal/version.buildAt={{.Date}}
24+
dockers_v2:
25+
- images:
26+
- singee/kitty
27+
tags:
28+
- "{{ .Version }}"
29+
- "{{ .Major }}.{{ .Minor }}"
30+
- latest
31+
platforms:
32+
- linux/amd64
33+
- linux/arm64
2234
archives:
2335
- format: tar.gz
2436
# this name template makes the OS and Arch compatible with the results of uname.

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM gcr.io/distroless/static-debian12:nonroot
2+
3+
ARG TARGETPLATFORM
4+
COPY $TARGETPLATFORM/kitty /usr/bin/kitty
5+
WORKDIR /worktree
6+
7+
ENTRYPOINT ["/usr/bin/kitty"]

0 commit comments

Comments
 (0)