Merge pull request #47 from flashcatcloud/feature_github_action

build arm64v8 artifacts
This commit is contained in:
kongfei605 2022-06-22 16:53:13 +08:00 committed by GitHub
commit dbd301c22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 4 deletions

View File

@ -15,12 +15,13 @@ builds:
main: ./
binary: categraf
env:
- CGO_ENABLED=1
- CGO_ENABLED=0
goos:
- linux
- windows
goarch:
- amd64
- arm64
ldflags:
- -s -w
- -X flashcat.cloud/categraf/config.Version={{ .Tag }}-{{.Commit}}
@ -44,7 +45,7 @@ release:
dockers:
- image_templates:
- flashcatcloud/categraf:amd64-{{ .Tag }}
- flashcatcloud/categraf:{{ .Tag }}-amd64
goos: linux
goarch: amd64
ids:
@ -71,12 +72,41 @@ dockers:
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- flashcatcloud/categraf:{{ .Tag }}-arm64v8
goos: linux
goarch: arm64
ids:
- build
dockerfile: docker/Dockerfile.goreleaser
extra_files:
- docker/entrypoint.sh
- conf/config.toml
- conf/logs.toml
- conf/input.cpu/cpu.toml
- conf/input.mem/mem.toml
- conf/input.disk/disk.toml
- conf/input.diskio/diskio.toml
- conf/input.kernel/kernel.toml
- conf/input.linux_sysctl_fs/linux_sysctl_fs.toml
- conf/input.system/system.toml
- conf/input.kernel_vmstat/kernel_vmstat.toml
- conf/input.netstat/netstat.toml
- conf/input.net/net.toml
- conf/input.docker/docker.toml
- conf/input.kubernetes/kubernetes.toml
- conf/input.processes/processes.toml
use: buildx
build_flag_templates:
- "--platform=linux/arm64/v8"
docker_manifests:
- name_template: flashcatcloud/categraf:{{ .Tag }}
image_templates:
- flashcatcloud/categraf:amd64-{{ .Tag }}
- flashcatcloud/categraf:{{ .Tag }}-amd64
- flashcatcloud/categraf:{{ .Tag }}-arm64v8
- name_template: flashcatcloud/categraf:latest
image_templates:
- flashcatcloud/categraf:amd64-{{ .Tag }}
- flashcatcloud/categraf:{{ .Tag }}-amd64
- flashcatcloud/categraf:{{ .Tag }}-arm64v8

View File

@ -1,3 +1,6 @@
//go:build enterpise
// +build enterpise
package oracle
import (