Skip to content

Commit

Permalink
Merge pull request #27 from smlx/version
Browse files Browse the repository at this point in the history
fix: add v prefix to version string
  • Loading branch information
smlx authored Jan 19, 2024
2 parents 39d5a7d + 1bfc317 commit 90758f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ builds:
-X "main.date={{.Date}}"
-X "main.goVersion={{.Env.GOVERSION}}"
-X "main.projectName={{.ProjectName}}"
-X "main.version={{.Version}}"
-X "main.version=v{{.Version}}"
env:
- CGO_ENABLED=0
goos:
Expand Down Expand Up @@ -40,30 +40,30 @@ dockers:
- ids:
- sems_mitm_exporter
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:v{{ .Version }}-amd64"
use: buildx
build_flag_templates:
- "--build-arg=BINARY=sems_mitm_exporter"
- "--platform=linux/amd64"
- ids:
- sems_mitm_exporter
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:{{ .Version }}-arm64v8"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:v{{ .Version }}-arm64v8"
use: buildx
goarch: arm64
build_flag_templates:
- "--build-arg=BINARY=sems_mitm_exporter"
- "--platform=linux/arm64/v8"

docker_manifests:
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:{{ .Version }}"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:v{{ .Version }}"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:{{ .Version }}-arm64v8"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:v{{ .Version }}-arm64v8"
- name_template: "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:latest"
image_templates:
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:{{ .Version }}-arm64v8"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:v{{ .Version }}-amd64"
- "ghcr.io/{{ .Env.GITHUB_REPOSITORY }}/sems_mitm_exporter:v{{ .Version }}-arm64v8"

docker_signs:
- args:
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM alpine:3.19@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
ARG BINARY=binary-build-arg-not-defined
ENTRYPOINT ["/${BINARY}"]
COPY $BINARY /
ENV BINARY=${BINARY}
ENTRYPOINT ["sh", "-c"]
CMD ["exec /${BINARY}"]
COPY ${BINARY} /

0 comments on commit 90758f6

Please sign in to comment.