Skip to content

Conversation

rgerganov
Copy link
Collaborator

When releasing a docker image for build number X, we should also create the corresponding git tag. This allows users to easily checkout the corresponding source tree for given docker image.

@github-actions github-actions bot added the devops improvements to build systems and github actions label Sep 15, 2025
@rgerganov rgerganov requested a review from Copilot September 15, 2025 12:53
Copy link

@Copilot 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 automatic git tag creation for released Docker images. The purpose is to allow users to easily checkout the corresponding source code for any given Docker image by providing a git tag that matches the Docker image tag.

Key changes:

  • Refactors tag determination logic to use a reusable action for generating source tag names
  • Adds a step to create and push git tags when Docker images are published

When releasing a docker image for build number X, we should also create
the corresponding git tag. This allows users to easily checkout the
corresponding source tree for given docker image.
Copy link
Collaborator

@CISC CISC left a comment

Choose a reason for hiding this comment

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

LGTM, not sure if you can push a tag without setting permissions though, have you tested it?

@rgerganov
Copy link
Collaborator Author

LGTM, not sure if you can push a tag without setting permissions though, have you tested it?

I don't know how to test such changes. Any help is appreciated.

@CISC
Copy link
Collaborator

CISC commented Sep 25, 2025

LGTM, not sure if you can push a tag without setting permissions though, have you tested it?

I don't know how to test such changes. Any help is appreciated.

Apply the changes to master in your fork and trigger the workflow.

Co-authored-by: Sigbjørn Skjæret <[email protected]>
@CISC
Copy link
Collaborator

CISC commented Sep 25, 2025

BTW, just checking, is your intention to just make sure that bXXXX is tagged (in case release failed), or did you mean to create some other tag?

@rgerganov
Copy link
Collaborator Author

I want to make sure that we have bXXXX tags for every released docker image. For example there is server-cuda-b6571 image but there is no b6571 tag.

The end goal is to have straightforward way to get the source tree for every docker image.

Co-authored-by: Sigbjørn Skjæret <[email protected]>
@CISC
Copy link
Collaborator

CISC commented Sep 25, 2025

LGTM, not sure if you can push a tag without setting permissions though, have you tested it?

I don't know how to test such changes. Any help is appreciated.

Apply the changes to master in your fork and trigger the workflow.

You probably want to cancel your Release workflow before it creates the tag, and then maybe for good measure test after a release has been made and tagged.

@CISC
Copy link
Collaborator

CISC commented Sep 25, 2025

@CISC
Copy link
Collaborator

CISC commented Sep 25, 2025

Yep, not allowed: https://github.com/rgerganov/llama.cpp/actions/runs/18009905451/job/51239436263#step:4:8

You probably need to add contents: write to permissions.

Co-authored-by: Sigbjørn Skjæret <[email protected]>
@CISC
Copy link
Collaborator

CISC commented Sep 26, 2025

@rgerganov
Copy link
Collaborator Author

Yes, it does work with the suggested changes, thanks for the help. I have also started the Release workflow to make sure it succeeds when tag already exists.

@rgerganov
Copy link
Collaborator Author

Both Release and Publish Docker image workflows run fine on my fork and create the correct tag. @CISC should we merge this?

@CISC
Copy link
Collaborator

CISC commented Sep 26, 2025

Both Release and Publish Docker image workflows run fine on my fork and create the correct tag. @CISC should we merge this?

Yes, looks good, merge at will.

@rgerganov rgerganov merged commit 00217cd into ggml-org:master Sep 26, 2025
3 checks passed
struct pushed a commit to struct/llama.cpp that referenced this pull request Sep 26, 2025
* ci : create git tags for released docker images

When releasing a docker image for build number X, we should also create
the corresponding git tag. This allows users to easily checkout the
corresponding source tree for given docker image.

* Update .github/workflows/docker.yml

Co-authored-by: Sigbjørn Skjæret <[email protected]>

* Update .github/workflows/docker.yml

Co-authored-by: Sigbjørn Skjæret <[email protected]>

* Apply suggestion from @CISC

Co-authored-by: Sigbjørn Skjæret <[email protected]>

---------

Co-authored-by: Sigbjørn Skjæret <[email protected]>
yael-works pushed a commit to yael-works/llama.cpp that referenced this pull request Oct 15, 2025
* ci : create git tags for released docker images

When releasing a docker image for build number X, we should also create
the corresponding git tag. This allows users to easily checkout the
corresponding source tree for given docker image.

* Update .github/workflows/docker.yml

Co-authored-by: Sigbjørn Skjæret <[email protected]>

* Update .github/workflows/docker.yml

Co-authored-by: Sigbjørn Skjæret <[email protected]>

* Apply suggestion from @CISC

Co-authored-by: Sigbjørn Skjæret <[email protected]>

---------

Co-authored-by: Sigbjørn Skjæret <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops improvements to build systems and github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants