-
Notifications
You must be signed in to change notification settings - Fork 5
Debian packaging via per-component Makefiles + fpm #347
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
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
96aee91
Add Apache-2.0 LICENSE
runleveldev 7f8eaea
Make manager units packaging-friendly
runleveldev 7c1a1f6
Add create-a-container packaging (opensource-server)
runleveldev c5aa71d
Add mie-opensource-landing packaging (opensource-docs)
runleveldev a5d66bd
Add pull-config packaging (opensource-agent)
runleveldev c6861dc
Replace top-level Makefile with component delegation
runleveldev 1bb1cc3
Build images from nfpm packages + stage release apt source
runleveldev 2d3775e
Use component make targets in compose dev services
runleveldev e04a67c
Add release workflow and expand image build triggers (Commit A)
runleveldev 1b419f5
Tag images :latest only on non-prerelease releases (Commit B)
runleveldev 58464de
Document the release pipeline; refresh stale docs
runleveldev a33967e
Refine opensource-server packaging; move DB init to manager image
runleveldev 9c50c49
Stop make package from mutating build-root in docs and agent
runleveldev 59653e4
Install package debs via RUN --mount; leave apt source in place
runleveldev 3258885
Revert compose dev services to built-in tooling
runleveldev 142ff57
Update release-pipeline docs for packaging refinements
runleveldev 3829e6e
pull-config: drop config tagging; stage to DESTDIR, not hard-coded bu…
runleveldev 5976293
Stage to DESTDIR instead of hard-coded build-root in docs and server
runleveldev 023bcec
Make docs and agent nfpm.yaml DRY via expand:true; rename staging dir
runleveldev a9cc2ba
create-a-container: move systemd units and maintainer scripts to cont…
runleveldev 9152ca0
Remove apt-get update guards; rely on flat-repo Packages on every rel…
runleveldev 1945952
make clean: remove built packages
runleveldev d5806ca
Fix package version on tagless/shallow checkouts
runleveldev 896a497
Trigger release workflow from a published release; upload assets to it
runleveldev b6c8994
Emit plain semver as VERSION; let nfpm render per-format
runleveldev a770732
Drop the v prefix from version handling
runleveldev a0e4411
docs: use unprefixed semver tags in release pipeline
runleveldev dd24d6d
Remove the 0.0.0 version fallback
runleveldev 1772c3a
Stop auto-tagging :latest on prereleases
runleveldev cea0ce2
Parse version parts from git; compose per-format version for nfpm
runleveldev 25c7957
Consolidate version construction into ./package-version
runleveldev b954b6d
Switch packaging from nfpm to classic fpm
runleveldev 6804269
Simplify fpm invocation
runleveldev c7c22f7
Install fpm in the builder image instead of nfpm
runleveldev 0b0f744
Document fpm packaging in the release pipeline
runleveldev f11560e
remove legacy pull-config installer
runleveldev e908ca9
Make help the default goal in every Makefile
runleveldev 4329e32
cleanup
runleveldev a7f29c7
Ignore .pkg packaging staging dir in Docker context
runleveldev f0882e5
Build images on push to main and on PRs only
runleveldev 67b06c9
Fix release-pipeline doc: help is the default goal; v prefix optional
runleveldev b9f1112
cleanup
runleveldev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Release Packages | ||
|
|
||
| # Triggered by publishing a GitHub release (full or prerelease). Builds the | ||
| # three Debian packages and uploads them to the release that triggered the | ||
| # workflow, together with flat APT repository metadata (Packages, Packages.gz) | ||
| # so the release can be used directly as an apt source: | ||
| # | ||
| # deb [trusted=yes] https://github.com/mieweb/opensource-server/releases/latest/download/ ./ | ||
| # | ||
| # The release URLs (releases/latest/download/<file>) serve the flat repo; the | ||
| # images ship this source so `apt upgrade` tracks future releases. This | ||
| # workflow never creates or modifies the release itself — create the release | ||
| # (and choose full vs prerelease) in GitHub first, then this attaches assets. | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-and-release: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Build packages | ||
| uses: docker/bake-action@v5 | ||
| with: | ||
| workdir: ./images | ||
| targets: builder | ||
| files: | | ||
| ./docker-bake.hcl | ||
| set: | | ||
| builder.output=type=local,dest=../dist | ||
|
|
||
| - name: Generate flat APT repository metadata | ||
| run: | | ||
| cd dist/dist | ||
| # Scan only the versioned packages so the apt index has no duplicates. | ||
| dpkg-scanpackages --multiversion . > Packages | ||
| gzip -k9f Packages | ||
| # Stable-name aliases for one-off downloads (the _latest URLs resolve | ||
| # via releases/latest/download for the newest non-prerelease release). | ||
| for pkg in opensource-server opensource-docs opensource-agent; do | ||
| f=$(ls ${pkg}_*.deb | head -1) | ||
| [ -n "$f" ] && cp -f "$f" "${pkg}_latest.deb" | ||
| done | ||
| ls -l | ||
|
|
||
| - name: Upload assets to the release | ||
| if: github.event_name == 'release' | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| TAG: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| gh release upload "$TAG" \ | ||
| dist/dist/*.deb \ | ||
| dist/dist/Packages \ | ||
| dist/dist/Packages.gz \ | ||
| --repo "${{ github.repository }}" \ | ||
| --clobber |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,6 @@ node_modules | |
| .env | ||
| .tmp-verify/ | ||
| .playwright-mcp/ | ||
|
|
||
| # packaging build artifacts | ||
| /dist/ | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.