diff --git a/.goreleaser.yml b/.goreleaser.yml index 41349ae5..0d54f312 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -30,6 +30,33 @@ builds: goos: [windows] goarch: [386, amd64] +dockers: + - image_templates: + - 'profclems/glab:{{ .Tag }}' + - 'ghcr.io/profclems/glab:{{ .Tag }}' + dockerfile: Dockerfile + use_buildx: true + build_flag_templates: + - "--pull" + - "--label=org.opencontainers.image.created={{.Date}}" + - "--label=org.opencontainers.image.name={{.ProjectName}}" + - "--label=org.opencontainers.image.revision={{.FullCommit}}" + - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=org.opencontainers.image.source={{.GitURL}}" + - "--platform=linux/amd64" + extra_files: + - scripts/entrypoint.sh +docker_manifests: + - name_template: 'profclems/glab:{{ .Tag }}' + image_templates: + - 'profclems/glab:{{ .Tag }}' + - name_template: 'profclems/glab:latest' + image_templates: + - 'profclems/glab:{{ .Tag }}' + - name_template: 'ghcr.io/profclems/glab:latest' + image_templates: + - 'ghcr.io/profclems/glab:{{ .Tag }}' + archives: - id: nix builds: [macos, linux] @@ -80,8 +107,9 @@ nfpms: # Override default /usr/local/bin destination for binaries # Since glab is already archived in the bin directory it would install in /usr/bin/glab bindir: /usr - files: - "./share/man/man1/glab*.1": "/usr/share/man/man1" + contents: + - src: "./share/man/man1/glab*.1" + dst: "/usr/share/man/man1" checksum: name_template: 'checksums.txt' diff --git a/Dockerfile b/Dockerfile index 791cd448..7236a8d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.16-alpine +FROM alpine:latest RUN apk add --no-cache bash \ curl \ @@ -14,5 +14,5 @@ CMD [ "-h" ] COPY scripts/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh -COPY dist/glab_*.apk /tmp/ +COPY glab_*.apk /tmp/ RUN apk add --allow-untrusted /tmp/glab_*.apk \ No newline at end of file