{"repo":"jandelgado/golang-ci-template-github-actions","free":true,"listed":false,"github":"https://github.com/jandelgado/golang-ci-template-github-actions","clone":"git clone https://github.com/jandelgado/golang-ci-template-github-actions.git","description":"example for golang project using github actions","language":"Go","stars":58,"topics":["golang","ci","github-actions","coveralls","coverage","goreleaser","docker"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"golang ci template using github actions Info Go-Version Dependabot Creating a release Linting & Test Linter Test Author Info This repository serves as a template for github-actions integrated go projects. It consists of a hello, world! like example in source file main.go which gets compiled into the binary my-app using goreleaser. The CI is configured to run golangci-linter on the code, before the unit tests are executed. Test coverage is uploaded to coveralls.io. goreleaser is used to create the final multi-plattform assets, which are automatically uploaded to the release. The release-process is triggered by pushing a git tag to the repository. Finally, a docker image is built, which gets published to ghcr.io. Run it with Go-Version The go version to use is configured in go.mod with the toolchain directive. When building locally, set GOTOOLCHAIN to auto to automatically install the configured toolchain (introduced with go 1.21). Dependabot We use dependabot to both keep the go dependencies as well as the used github action up-to-date. The configuration can be found here. Creating a release A new release is created by creating a git tag and pushing it, e.g.: The push of the new tag triggers the CI, which uses goreleaser with this configuration to build multi-platform release artifacts create a new release upload the artifacts, which are then available on the releases page. Finally, a docker image is built using the previously built artefacts. The image is published to ghcr.io","default_branch":null,"files":null,"tree":[],"storefront":"/r/jandelgado","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jandelgado/golang-ci-template-github-actions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}