Skip to content

fix(Docker): add latest tag support for versioned releases#2374

Merged
meteyou merged 1 commit intomainsail-crew:developfrom
meteyou:fix/docker-latest-tag
Jan 5, 2026
Merged

fix(Docker): add latest tag support for versioned releases#2374
meteyou merged 1 commit intomainsail-crew:developfrom
meteyou:fix/docker-latest-tag

Conversation

@meteyou
Copy link
Member

@meteyou meteyou commented Jan 5, 2026

Description

This PR fix the missing latest tag for Docker images.

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings

none

[optional] Are there any post-deployment tasks we need to perform?

none

Signed-off-by: Stefan Dej <meteyou@gmail.com>
Copy link
Contributor

Copilot AI left a comment

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 adds the latest tag to Docker images when versioned releases (tags starting with v) are published, addressing issue #2362. The implementation uses the docker/metadata-action's conditional tag feature to ensure only versioned releases receive the latest tag, while develop branch builds do not.

  • Adds conditional latest tag support using type=raw with an enable condition
  • Applies to both the standard and unprivileged Docker image variants via YAML anchor reuse

@meteyou meteyou merged commit a519f23 into mainsail-crew:develop Jan 5, 2026
12 checks passed
@meteyou meteyou deleted the fix/docker-latest-tag branch January 5, 2026 23:41
@meteyou meteyou added this to the v2.17.0 milestone Jan 5, 2026
@springhack
Copy link

Seem not work, only edge and sha tags available, even without the version tags:

Log from v2.17.0 build

Run docker/metadata-action@v5
  with:
    images: ghcr.io/mainsail-crew/mainsail
    tags: type=edge,branch=develop
  type=semver,pattern=v{{major}}
  type=semver,pattern=v{{major}}.{{minor}}
  type=semver,pattern=v{{major}}.{{minor}}.{{patch}}
  type=sha
  type=raw,value=latest,enable=false
  
    context: workflow
    github-token: ***
  env:
    REGISTRY: ghcr.io
    IMAGE_NAME: mainsail-crew/mainsail
Context info
Processing images input
Processing tags input
  type=semver,pattern=v{{major}},value=,match=,enable=true,priority=900
  type=semver,pattern=v{{major}}.{{minor}},value=,match=,enable=true,priority=900
  type=semver,pattern=v{{major}}.{{minor}}.{{patch}},value=,match=,enable=true,priority=900
  type=edge,branch=develop,enable=true,priority=700
  type=raw,value=latest,enable=false,priority=200
  type=sha,prefix=sha-,format=short,enable=true,priority=100
Processing flavor input
Docker image version
Docker tags
  ghcr.io/mainsail-crew/mainsail:edge
  ghcr.io/mainsail-crew/mainsail:sha-3783e07

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.

Docker image tags does not get updated since v2.14.0

4 participants