Skip to content

Improve MW version extraction in Docker workflow #545

@tosfos

Description

@tosfos

The master branch workflow has two somewhat related issues related to the MW version extraction:

  1. The Dockerfile uses FROM ghcr.io/canastawiki/canasta-base AS base (no fix version), which can cause failures when CanastaBase is updated. It's asking for trouble.
  2. The workflow builds the entire Canasta image just to extract MW_CORE_VERSION from the environment variable. (See Remove hardcoding of mediawiki version #512.) This is an enormous and unnecessary waste.

To fix only the version extraction, we can use docker inspect.

To fix both issues, the easy way is to:

  • Change the Dockerfile to pin CanastaBase to a particular version
  • Extract the version from the pinned tag in Dockerfile using sed similar to how it was done pre-CanastaBase or use docker inspect

Or better and cleaner:

  • Add a label in CanastaBase's Dockerfile to benefit anybody downstream
  • Grab the label with docker inspect

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions