Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arm builds #189

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
Expand Down
25 changes: 13 additions & 12 deletions goreleaser.yaml → .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 1
version: 2
project_name: "transfer"

#before:
# hooks:
# - go mod tidy
# - go generate ./...
before:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this?

hooks:
- go mod tidy
- go generate ./...

builds:
- env:
Expand All @@ -16,18 +16,15 @@ builds:
goarch:
- amd64
- arm64
goarm:
- 8
main: ./cmd/trcli
binary: trcli

archives:
- format: tar.gz
- formats: ["tar.gz"]
name_template: >-
{{ .ProjectName }}_
{{- .Os }}_
{{- .Arch }}
{{- if .Arm }}v{{ .Arm }}{{ end }}

changelog:
sort: asc
Expand All @@ -46,18 +43,22 @@ release:
dockers:
- image_templates:
- "ghcr.io/doublecloud/transfer:{{.Version}}-amd64"
goos: linux
goarch: amd64
use: buildx
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/doublecloud/transfer:{{.Version}}-arm64v8"
- "ghcr.io/doublecloud/transfer:{{.Version}}-arm64"
goos: linux
goarch: arm64
use: buildx
dockerfile: Dockerfile
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--platform=linux/arm64"
docker_manifests:
- name_template: "ghcr.io/doublecloud/transfer:{{.Version}}"
image_templates:
- "ghcr.io/doublecloud/transfer:{{.Version}}-amd64"
- "ghcr.io/doublecloud/transfer:{{.Version}}-arm64v8"
- "ghcr.io/doublecloud/transfer:{{.Version}}-arm64"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ VOLUME /var/lib/docker
# Create a non-root user and group
RUN addgroup --system trcligroup && adduser --system --ingroup trcligroup trcliuser

# Copy the Go binary from Stage 1 (builder)
# Copy the Go binary
COPY trcli /usr/local/bin/trcli

RUN chmod +x /usr/local/bin/trcli
Expand Down
Loading