diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c0d6707..4545a88 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,6 +20,14 @@ jobs: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_SECRET }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: 'amd64,arm64' + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Setup Go uses: actions/setup-go@v3 with: diff --git a/.goreleaser.yml b/.goreleaser.yml index 6192608..40cba7e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -5,19 +5,20 @@ builds: - linux goarch: - amd64 + - arm64 main: ./cmd/falco-exporter env: - CGO_ENABLED=0 binary: falco-exporter dockers: - - + - use: buildx goos: linux goarch: amd64 dockerfile: build/Dockerfile image_templates: - - "falcosecurity/falco-exporter:latest" - - "falcosecurity/falco-exporter:{{ .Version }}" + - "falcosecurity/falco-exporter:latest-amd64" + - "falcosecurity/falco-exporter:{{ .Version }}-amd64" build_flag_templates: - "--pull" - "--label=org.opencontainers.image.created={{.Date}}" @@ -30,6 +31,36 @@ dockers: - go.mod - go.sum - Makefile + - use: buildx + goos: linux + goarch: arm64 + dockerfile: build/Dockerfile + image_templates: + - "falcosecurity/falco-exporter:latest-arm64v8" + - "falcosecurity/falco-exporter:{{ .Version }}-arm64v8" + build_flag_templates: + - "--platform=linux/arm64/v8" + - "--pull" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + extra_files: + - cmd + - pkg + - go.mod + - go.sum + - Makefile +docker_manifests: + # https://goreleaser.com/customization/docker_manifest/ + - name_template: falcosecurity/falco-exporter:{{ .Version }} + image_templates: + - falcosecurity/falco-exporter:{{ .Version }}-amd64 + - falcosecurity/falco-exporter:{{ .Version }}-arm64v8 + - name_template: falcosecurity/falco-exporter:latest + image_templates: + - falcosecurity/falco-exporter:latest-amd64 + - falcosecurity/falco-exporter:latest-arm64v8 release: github: diff --git a/README.md b/README.md index 11a80d8..96b2a70 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![License](https://img.shields.io/github/license/falcosecurity/falco-exporter?style=flat-square)](LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/falcosecurity/falco-exporter?style=flat-square)](https://goreportcard.com/report/github.com/falcosecurity/falco-exporter) [![Docker pulls](https://img.shields.io/docker/pulls/falcosecurity/falco-exporter?style=flat-square)](https://hub.docker.com/r/falcosecurity/falco-exporter) +![Architectures](https://img.shields.io/badge/ARCHS-x86__64%7Caarch64-blueviolet?style=flat-square) ## Prerequisites