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

Release: Use GoReleaser for release #400

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aymanbagabas
Copy link

@aymanbagabas aymanbagabas commented Aug 26, 2021

This PR emerged cause I wanted a docker image that can be used to deploy ssh-chat quickly and reliably.

Related: #111 #253

Since the workflow runs on tag creation, a release is as easy as pushing a new tag in the form of v*.*.

  • use github actions and goreleaser to automatically build and publish
    release on new tags
  • build binaries
  • build dep/rpm packages for linux
  • build docker images tagged with release version and 'latest' tag
  • publish release on github releases
  • publish docker images on github container registry
  • replace Dockerfile with Dockerfile.goreleaser
  • update docker-compose.yml to use ghcr.io

Release example: https://github.com/aymanbagabas/ssh-chat/releases
Containers example: https://github.com/aymanbagabas/ssh-chat/pkgs/container/ssh-chat

This publishes 2 docker images for Linux amd64 and arm64. Along with Github release artifacts for Linux, Darwin, Windows, and FreeBSD.

CAVEATS:
This might make break publishing releases through Github Releases. Whenever I try to create a new release on my fork I get We weren’t able to create the release for you. Make sure you have a valid tag. even though I have a valid tag.

Docker deployments

As the docker-compose.yml file show, deployment can be as easy as mapping a volume that contains the identity file, admins, motd, etc and customizing the command parameter in Docker.

- use github actions and goreleaser to automatically build and publish
  release on new tags
- build binaries
- build dep/rpm packages for linux
- build docker images tagged with release version and 'latest' tag
- publish release on github releases
- publish docker images on github container registry
- replace `Dockerfile` with `Dockerfile.goreleaser`
- update `docker-compose.yml` to use `ghcr.io`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant