diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 62928cff..4cb0c976 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,6 +70,9 @@ jobs: runs-on: ubuntu-20.04 + env: + DOCKER_CLI_EXPERIMENTAL: enabled + steps: - name: Set up Go uses: actions/setup-go@v2.1.5 @@ -81,6 +84,9 @@ jobs: with: cosign-release: 'v1.4.1' + - name: Set up QEMU + uses: docker/setup-qemu-action@v1.2.0 + - name: Checkout uses: actions/checkout@v2.4.0 with: diff --git a/.goreleaser.draft.yml b/.goreleaser.draft.yml index d2adf47f..9772fe83 100644 --- a/.goreleaser.draft.yml +++ b/.goreleaser.draft.yml @@ -6,6 +6,10 @@ before: env: - CGO_ENABLED=0 + - DOCKER_CLI_EXPERIMENTAL=enabled + +checksum: + name_template: 'checksums.txt' builds: - id: binary @@ -36,19 +40,36 @@ archives: - goos: windows format: zip -checksum: - name_template: 'checksums.txt' - dockers: - goos: linux goarch: amd64 + use: buildx + image_templates: + - "ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-amd64" + build_flag_templates: + - "--pull" + - "--platform=linux/amd64" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.title={{.ProjectName}}" + - "--label=org.opencontainers.image.description={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version=v{{.Version}}" + - "--label=org.opencontainers.image.licenses=MIT" + - "--label=org.opencontainers.image.vendor=Koninklijke Philips N.V." + extra_files: + - "Makefile" + - "go.mod" + - "go.sum" + - "cmd" + - "lib" + - goos: linux + goarch: arm64 + use: buildx image_templates: - - "philipssoftware/{{ .ProjectName }}:v{{ .Version }}" - - "philipssoftware/{{ .ProjectName }}:{{ .FullCommit }}" - - "ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}" - - "ghcr.io/philips-labs/{{ .ProjectName }}:{{ .FullCommit }}" + - "ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-arm64v8" build_flag_templates: - "--pull" + - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.description={{.ProjectName}}" @@ -63,6 +84,24 @@ dockers: - "cmd" - "lib" +docker_manifests: + - name_template: 'philipssoftware/{{ .ProjectName }}:v{{ .Version }}' + image_templates: + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-arm64v8' + - name_template: 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}' + image_templates: + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-arm64' + - name_template: 'philipssoftware/{{ .ProjectName }}:{{ .FullCommit }}' + image_templates: + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-arm64v8' + - name_template: 'ghcr.io/philips-labs/{{ .ProjectName }}:{{ .FullCommit }}' + image_templates: + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-arm64v8' + signs: - id: checksums cmd: cosign diff --git a/.goreleaser.yml b/.goreleaser.yml index 8eb3715c..8d5dd4d1 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,6 +6,10 @@ before: env: - CGO_ENABLED=0 + - DOCKER_CLI_EXPERIMENTAL=enabled + +checksum: + name_template: 'checksums.txt' builds: - id: binary @@ -36,9 +40,6 @@ archives: - goos: windows format: zip -checksum: - name_template: 'checksums.txt' - dockers: - goos: linux goarch: amd64 @@ -63,6 +64,24 @@ dockers: - "cmd" - "lib" +docker_manifests: + - name_template: 'philipssoftware/{{ .ProjectName }}:v{{ .Version }}' + image_templates: + - 'philipssoftware/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'philipssoftware/{{ .ProjectName }}:v{{ .Version }}-arm64' + - name_template: 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}' + image_templates: + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-arm64' + - name_template: 'philipssoftware/{{ .ProjectName }}:{{ .FullCommit }}' + image_templates: + - 'philipssoftware/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'philipssoftware/{{ .ProjectName }}:v{{ .Version }}-arm64' + - name_template: 'ghcr.io/philips-labs/{{ .ProjectName }}:{{ .FullCommit }}' + image_templates: + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-amd64' + - 'ghcr.io/philips-labs/{{ .ProjectName }}:v{{ .Version }}-arm64' + signs: - id: checksums cmd: cosign