💪
Motivation I created this repository for learning and education purposes to help everyone to level up their (open source) projects with good documentation and code/release automation. I spend a lot of time learning and experimenting with different tools and integrations to manage the projects I'm working, thus trying to give some inspiration to save you precious time
Of course there's many ways to automate the release process for your (Go) applications, so consider the examples shared in this repository ONE but not THE way.
Even though this repository puts a focus on building and releasing Go applications, the Github Actions workflows and explanations provided apply to any language/environment.
README
generator to bootstrap a nice landing page for your users.
💡
About This repository shows an end-to-end release management approach for Go applications using Github Actions as a pipeline for continuous integration (CI), goreleaser
for artifact and release management, ko
to build OCI-compliant container images, and Kubernetes in Docker (kind
) for end-to-end testing.
Another goodie: depending on your repository settings and usage, you are likely to stay within the generous Github Actions free tier.
Github Actions is also deeply integrated into Github Packages, a software package hosting service that allows you to host your software packages, e.g. container images.
Even if you don't use Github Actions (yet), I hope the repository still provides value since the tools used here can be used standalone, too.
🚦
Project Status
🤩
Features Based on a trivial Go demo application this repository was built to show the power of Github Actions and related Go tools with the following highlights:
README.md
CHANGELOG.md
ko
to not worry about building container images and Dockerfiles
ko
with kind
for super fast development and end-to-end testing against real APIs (Kubernetes)
💎
Artifacts You can grab the resulting artifacts produced by the Github release workflow from the releases page.
🍺
Homebrew As part of this project, a Homebrew formula is maintained and continuously updated as part of the release pipeline. Detailed installation instructions can be found in the dedicated repository.
Quick install via brew
:
$ brew install embano1/ci-demo-app/demo-app
🐳
Docker Multi-arch (platform) Docker images are pushed to Docker Hub as part of the release pipeline. Visit the Docker Hub Project page for details.
Run the app via docker
:
$ # expose default port 8080 to 8080 on the Docker host
$ # interrupt with CTRL-C
$ docker run -it --rm -p 8080:8080 embano1/ci-demo-app:v0.2.7
2021-05-04T14:31:00.658Z INFO ci-demo-app ci-demo-app/main.go:85 running server {"commit": "e616df52", "address": ":8080"}
2021-05-04T14:31:02.933Z INFO ci-demo-app ci-demo-app/main.go:81 got signal, attempting graceful shutdown {"commit": "e616df52"}
👾
Source Tarballs See Github Release page. A full CHANGELOG
is also provided.
🧭
Navigating this Repository If you want to see the Github Action workflows used in this repository in action please see this document.
If you are interested in the individual tools used here or you want to learn more about Github Actions, please see this document.
❌
Out of Scope (for now) - Golang deep dive, advanced testing, etc. (this repo isn't about teaching Go)
- Using Github Packages
- Advanced 3rd party integration, e.g. Slack, bots to manage issues, comments, etc.
- External (manual) workflow dispatch triggers
- Branch protection and role based access control
- Organization-wide workflows and templates
- Detailed security and repository hardening and guidelines (see notes here)
- Detailed guidelines for writing your custom Github Actions
- Creating/distributing software artifacts other than Go binaries/Homebrew formulas (see
goreleaser
section in DETAILS to get some inspiration)
💐
Credits A BIG THANK YOU to the Knative community for their endless inspiration