Skip to content
Merged
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
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,21 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: 1.23.x
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 28 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,33 @@ builds:
goarch:
- amd64
- arm64

dockers:
- image_templates:
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-amd64"
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:latest-amd64"
dockerfile: Dockerfile
use: buildx
build_flag:
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-arm64"
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:latest-arm64"
dockerfile: Dockerfile
use: buildx
build_flag:
- "--platform=linux/arm64"

docker_manifests:
- name_template: "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}"
image_templates:
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-amd64"
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:{{ if not .IsSnapshot }}v{{ end }}{{ .Version }}-arm64"
- name_template: "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:latest"
image_templates:
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:latest-amd64"
- "ghcr.io/{{ .RepoOwner }}/{{ .ProjectName }}:latest-arm64"

archives:
- format: zip
name_template: >-
Expand All @@ -26,4 +53,4 @@ archives:
{{- .Arch }}
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
algorithm: sha256
algorithm: sha256
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM alpine:latest

RUN apk --no-cache add ca-certificates
COPY srvctl /usr/local/bin/srvctl

ENTRYPOINT ["/usr/local/bin/srvctl"]
Loading