Skip to content

Commit

Permalink
new: support arm64 artifacts and docker images.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Jan 20, 2023
1 parent 8fcae1d commit 55bafd4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
37 changes: 34 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 55bafd4

Please sign in to comment.