1
0
mirror of https://github.com/ribbybibby/ssl_exporter.git synced 2024-11-24 08:22:17 +02:00

Build multi-arch docker images

This commit is contained in:
Rob Best 2021-12-31 11:59:20 +00:00
parent d38244bc39
commit 8e318931c5
3 changed files with 41 additions and 12 deletions

View File

@ -14,6 +14,9 @@ jobs:
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Qemu
uses: docker/setup-qemu-action@v1
- name: Set up Go
uses: actions/setup-go@v1
with:

View File

@ -21,6 +21,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Set up Qemu
uses: docker/setup-qemu-action@v1
- name: Set up Go
uses: actions/setup-go@v1
with:

View File

@ -8,8 +8,8 @@ builds:
- darwin
- windows
goarch:
- "386"
- amd64
- '386'
- arm
- arm64
- mips64le
@ -26,14 +26,37 @@ release:
owner: ribbybibby
name: ssl_exporter
dockers:
- image_templates:
- '{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}'
- '{{.Env.APP_DOCKER_IMAGE_NAME}}:latest'
dockerfile: Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.Commit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- image_templates:
- "{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}-amd64"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--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}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/amd64"
- image_templates:
- "{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}-arm64"
dockerfile: Dockerfile
use: buildx
build_flag_templates:
- "--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}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--platform=linux/arm64"
goarch: arm64
docker_manifests:
- name_template: "{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}"
image_templates:
- "{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}-amd64"
- "{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}-arm64"
- name_template: "{{.Env.APP_DOCKER_IMAGE_NAME}}:latest"
image_templates:
- "{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}-amd64"
- "{{.Env.APP_DOCKER_IMAGE_NAME}}:{{.Version}}-arm64"