release image to docker hub

This commit is contained in:
kongfei 2022-06-14 15:12:16 +08:00
parent 80a68edd1a
commit 72a83a334f
2 changed files with 42 additions and 0 deletions

View File

@ -19,6 +19,10 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:

View File

@ -41,3 +41,41 @@ release:
owner: flashcatcloud
name: categraf
name_template: "v{{ .Version }}"
dockers:
- image_templates:
- flashcatcloud/categraf:amd64-{{ .Tag }}
goos: linux
goarch: amd64
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.processes/processes.toml
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
docker_manifests:
- name_template: flashcatcloud/categraf:{{ .Tag }}
image_templates:
- flashcatcloud/categraf:amd64-{{ .Tag }}
- name_template: flashcatcloud/categraf:latest
image_templates:
- flashcatcloud/categraf:amd64-{{ .Tag }}