-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
48 lines (41 loc) · 1.02 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
load("@gazelle//:def.bzl", "gazelle")
load("@rules_go//go:def.bzl", "go_binary", "go_library")
load("@rules_oci//oci:defs.bzl", "oci_image", "oci_push", "oci_tarball")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
# gazelle:prefix github.com/blackhorseya/godine
# gazelle:proto disable_global
# gazelle:build_tags integration
gazelle(name = "gazelle")
go_library(
name = "godine_lib",
srcs = ["main.go"],
importpath = "github.com/blackhorseya/godine",
visibility = ["//visibility:private"],
deps = ["//cmd"],
)
go_binary(
name = "godine",
embed = [":godine_lib"],
visibility = ["//visibility:public"],
)
pkg_tar(
name = "tar",
srcs = [":godine"],
)
oci_image(
name = "image",
base = "@alpine",
entrypoint = ["/godine"],
tars = [":tar"],
)
oci_tarball(
name = "tarball",
image = ":image",
repo_tags = ["ghcr.io/blackhorseya/godine:latest"],
)
oci_push(
name = "push",
image = ":image",
remote_tags = ["latest"],
repository = "ghcr.io/blackhorseya/godine",
)