Skip to content

ci: publish released MWS images to GHCR - #137

Open
linonetwo wants to merge 1 commit into
TiddlyWiki:mainfrom
linonetwo:ci/publish-npm-releases
Open

ci: publish released MWS images to GHCR#137
linonetwo wants to merge 1 commit into
TiddlyWiki:mainfrom
linonetwo:ci/publish-npm-releases

Conversation

@linonetwo

Copy link
Copy Markdown

Replaces #134 with a release-based container workflow.

This does not build production images from main and does not install @latest:

  • The Dockerfile now matches npm init @tiddlywiki/mws: it uses the 0.2.0 instance-data format, installs one exact published @tiddlywiki/mws version, and runs mws update-tiddlywiki while building the image.
  • Native build tools are available only while npm install runs, so an Alpine build can compile a dependency when a prebuilt binary is unavailable.
  • Pull requests build the image but cannot publish it.
  • A published GitHub Release builds the tag named by that release after verifying the corresponding MWS version is already available on npm. A manual fallback accepts an explicit published npm version.
  • Published images receive only an immutable MWS version tag, for example ghcr.io/tiddlywiki/multiwikiserver:0.2.4; the workflow deliberately does not publish main or latest.

The existing Docker Compose volume contract is unchanged: only /data/store is mounted. This PR does not impose my Kubernetes-specific full-/data layout.

Copilot AI lite review requested due to automatic review settings August 20, 2026 13:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the container build and CI/CD so MultiWikiServer images are produced from published releases (or a manual dispatch) and pushed to GHCR with only an immutable @tiddlywiki/mws version tag (no main/latest).

Changes:

  • Docker image now installs a single exact @tiddlywiki/mws version (via MWS_VERSION build arg) and runs mws update-tiddlywiki at build time, matching the npm init @tiddlywiki/mws instance template.
  • Adds a GitHub Actions workflow that builds on PRs (no publish) and publishes on GitHub Release published events (or manual dispatch) after verifying the npm version exists.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Dockerfile Pins the installed @tiddlywiki/mws version via build arg, aligns instance-data format with the template, and runs mws update-tiddlywiki during image build.
.github/workflows/publish-container.yml Introduces PR build + release/manual publish workflow to GHCR using an immutable version tag.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +51 to +55
- name: Check out release source
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || github.sha }}

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.

2 participants