Skip to content

Commit

Permalink
feat: publish docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsk committed Nov 25, 2023
1 parent 0373c95 commit 00f3187
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 3 deletions.
61 changes: 58 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ brews:
name: homebrew-tap
install: |
bin.install "sparkle"
output = Utils.popen_read("#{bin}/sparkle completion bash")
(bash_completion/"sparkle").write output
output = Utils.popen_read("#{bin}/sparkle completion fish")
(fish_completion/"sparkle.fish").write output
output = Utils.popen_read("#{bin}/sparkle completion zsh")
(zsh_completion/"_sparkle").write output
Expand All @@ -56,6 +53,64 @@ builds:

checksum: { name_template: checksums.txt }

dockers:
- id: service-linux-amd64
goos: linux
goarch: amd64
ids:
- sparkle
image_templates:
- 'ghcr.io/withsparkle/service:{{.Tag}}-amd64'
- 'ghcr.io/withsparkle/service:v{{.Major}}-amd64'
- 'ghcr.io/withsparkle/service:v{{.Major}}.{{.Minor}}-amd64'
use: buildx
build_flag_templates:
- '--pull'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--platform=linux/amd64'
extra_files:
- deploy/config.toml
- LICENSE
- id: server-linux-arm64
goos: linux
goarch: arm64
ids:
- server
image_templates:
- 'ghcr.io/withsparkle/service:{{.Tag}}-arm64'
- 'ghcr.io/withsparkle/service:v{{.Major}}-arm64'
- 'ghcr.io/withsparkle/service:v{{.Major}}.{{.Minor}}-arm64'
use: buildx
build_flag_templates:
- '--pull'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--platform=linux/arm64'
extra_files:
- deploy/config.toml
- LICENSE

docker_manifests:
- name_template: 'ghcr.io/withsparkle/service:latest'
image_templates:
- 'ghcr.io/withsparkle/service:{{.Tag}}-amd64'
- 'ghcr.io/withsparkle/service:{{.Tag}}-arm64'
- name_template: 'ghcr.io/withsparkle/service:{{.Tag}}'
image_templates:
- 'ghcr.io/withsparkle/service:{{.Tag}}-amd64'
- 'ghcr.io/withsparkle/service:{{.Tag}}-arm64'
- name_template: 'ghcr.io/withsparkle/service:v{{.Major}}'
image_templates:
- 'ghcr.io/withsparkle/service:v{{.Major}}-amd64'
- 'ghcr.io/withsparkle/service:v{{.Major}}-arm64'
- name_template: 'ghcr.io/withsparkle/service:v{{.Major}}.{{.Minor}}'
image_templates:
- 'ghcr.io/withsparkle/service:v{{.Major}}.{{.Minor}}-amd64'
- 'ghcr.io/withsparkle/service:v{{.Major}}.{{.Minor}}-arm64'

release:
github:
owner: withsparkle
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM scratch

LABEL author="OctoLab team <team@octolab.org>"
LABEL org.opencontainers.image.title="✨ Sparkle service"
LABEL org.opencontainers.image.description="The personal development framework and Personal Knowledge Management platform."
LABEL org.opencontainers.image.source="https://github.com/withsparkle/service"
LABEL org.opencontainers.image.licenses="AGPL-3.0-later"

COPY sparkle /
EXPOSE 3360 8080 8081 8890 8891

ENTRYPOINT ["/sparkle"]
CMD ["server", "run"]

0 comments on commit 00f3187

Please sign in to comment.