Commit f9aaf29b authored by Ivan Vandot's avatar Ivan Vandot Committed by GitHub

Docker arm image support (#1315)

parent 512230d7
...@@ -12,11 +12,21 @@ jobs: ...@@ -12,11 +12,21 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v1 uses: actions/setup-go@v2
with: with:
go-version: 1.15 go-version: 1.15
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Docker Login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v2
with: with:
......
project_name: bee project_name: bee
builds: builds:
- main: ./cmd/bee - id: linux
main: ./cmd/bee
binary: bee binary: bee
flags: flags:
- -v - -v
...@@ -12,7 +13,6 @@ builds: ...@@ -12,7 +13,6 @@ builds:
- CGO_ENABLED=0 - CGO_ENABLED=0
goos: goos:
- linux - linux
- windows
goarch: goarch:
- amd64 - amd64
- 386 - 386
...@@ -20,11 +20,21 @@ builds: ...@@ -20,11 +20,21 @@ builds:
- arm - arm
goarm: goarm:
- 7 - 7
ignore: - id: windows
- goos: windows main: ./cmd/bee
goarch: arm64 binary: bee
- goos: windows flags:
goarch: arm - -v
- -trimpath
ldflags:
- -s -w -X github.com/ethersphere/bee.version={{.Version}} -X github.com/ethersphere/bee.commit={{.ShortCommit}}
env:
- CGO_ENABLED=0
goos:
- windows
goarch:
- amd64
- 386
- id: darwin - id: darwin
main: ./cmd/bee main: ./cmd/bee
binary: bee binary: bee
...@@ -168,3 +178,74 @@ brews: ...@@ -168,3 +178,74 @@ brews:
<string>#{var}/log/swarm-bee/bee.log</string> <string>#{var}/log/swarm-bee/bee.log</string>
</dict> </dict>
</plist> </plist>
dockers:
- image_templates:
- "ethersphere/bee:{{ .Version }}-amd64"
use_buildx: true
ids:
- linux
goarch: amd64
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/amd64"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates:
- "ethersphere/bee:{{ .Version }}-armv7"
use_buildx: true
ids:
- linux
goarch: arm
goarm: 7
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/arm/v7"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- image_templates:
- "ethersphere/bee:{{ .Version }}-arm64v8"
use_buildx: true
ids:
- linux
goarch: arm64
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
docker_manifests:
- name_template: ethersphere/bee:{{ .Major }}
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }}
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:{{ .Major }}.{{ .Minor }}.{{ .Patch }}
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:latest
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
- name_template: ethersphere/bee:beta
image_templates:
- ethersphere/bee:{{ .Version }}-amd64
- ethersphere/bee:{{ .Version }}-armv7
- ethersphere/bee:{{ .Version }}-arm64v8
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment