-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add reproducible debian packaging with goreleaser & CI workflow #45
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
base: main
Are you sure you want to change the base?
Conversation
672b6f8
to
2e06404
Compare
set -e | ||
|
||
if ! id "go-template" &>/dev/null; then | ||
useradd --system --no-create-home --shell /bin/false go-template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think on installation it should create users and modify the overall system by default 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is following the packaging best practices of having the binary, systemd, and the user creation which the systemd will use to execute the binary with. So part of the deb installation process.
We could remove this but it might be beneficial for the general use-case where you package your workflow and provide a installation/startup process for it
d4d29df
to
df3c7bd
Compare
@@ -64,7 +64,7 @@ jobs: | |||
run: go install mvdan.cc/[email protected] | |||
|
|||
- name: Install staticcheck | |||
run: go install honnef.co/go/tools/cmd/staticcheck@2025.1.1 | |||
run: go install honnef.co/go/tools/cmd/staticcheck@v0.6.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
This pull request introduces comprehensive updates to the release workflow, packaging system, and reproducibility features for the project. Key changes include enhancements to the GitHub Actions workflow for releases, a new
Makefile
section for packaging, reproducible Debian packaging with GoReleaser, and systemd integration for the HTTP server. These changes aim to improve automation, ensure reproducible builds, and simplify deployment.GitHub Actions Workflow Enhancements
.github/workflows/release.yaml
.Packaging and Reproducibility
.goreleaser.yaml
.Makefile
targets for building, testing, and cleaning packages, as well as verifying reproducibility of builds.Systemd Integration
packaging/go-template-httpserver.service
) for the HTTP server, with configuration for secure operation and logging.packaging/go-template-httpserver.default
) for customizable runtime parameters.Post-Install and Cleanup Scripts
Documentation Updates
README.md
with instructions for reproducible Debian packaging, including prerequisites, build steps, and package contents.