Skip to content

Conversation

@andybavier
Copy link
Contributor

Add a GitHub workflow for publishing Docker images to Docker Hub and GHCR when the VERSION is updated.

Signed-off-by: Andy Bavier <andybavier@gmail.com>
Signed-off-by: Andy Bavier <andybavier@gmail.com>
@andybavier andybavier requested a review from SeanCondon January 21, 2026 16:38
Signed-off-by: Andy Bavier <andybavier@gmail.com>
Copy link

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

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

LGTM. However, note that #230 replaces the local GHAs with reusable workflows from onosproject/.github, which I think is the most appropriate way to proceed with this (make change only once in onosproject/.github are reuse it everywhere in the onosproject organization. I strongly recommend review/merge that PR first and convert the jobs from this push.yml into reusable workflows

Copy link

@SeanCondon SeanCondon left a comment

Choose a reason for hiding this comment

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

See comment from Gemini - might be worth doing

secrets: inherit

update-version:
needs: tag-github

Choose a reason for hiding this comment

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

Gemini highlighted a "Parallel Execution" Risk

Currently, release-image and update-version run in parallel because they both only depend on tag-github.

The Problem: If release-image fails (e.g., Docker registry is down, build error), update-version might still succeed. The Result: Your repository will bump the version (e.g., to 1.2.4-SNAPSHOT), but the artifact for 1.2.3 was never published. You end up in a "zombie state" where the git history says the release is done, but the container registry is empty.

The Fix: Make update-version depend on the success of release-image.

Choose a reason for hiding this comment

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

I partially agree with this comment/suggestion. What happens if the release-image fail? Image is not published and VERSION is NOT updated (update-version does not run). So, you have to manually (re)trigger the release-image action again until it is successful and then you need to manually trigger the update-version action.
On the other hand, if we leave the parallelism there, update-version will always run (based on tag-github) and you have to manually (re)trigger the release-image action if needed, which is the approach we took for the sd-core

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As @gab-arrobo points out, it's not entirely clear what is the ideal behavior if the release_image job fails. It sounds like leaving as-is will at least keep the behavior consistent with sd-core so I'm inclined to do that.

@andybavier
Copy link
Contributor Author

LGTM. However, note that #230 replaces the local GHAs with reusable workflows from onosproject/.github, which I think is the most appropriate way to proceed with this (make change only once in onosproject/.github are reuse it everywhere in the onosproject organization. I strongly recommend review/merge that PR first and convert the jobs from this push.yml into reusable workflows

@gab-arrobo Let me know if this PR is what you are looking for: onosproject/.github#14

@gab-arrobo
Copy link

LGTM. However, note that #230 replaces the local GHAs with reusable workflows from onosproject/.github, which I think is the most appropriate way to proceed with this (make change only once in onosproject/.github are reuse it everywhere in the onosproject organization. I strongly recommend review/merge that PR first and convert the jobs from this push.yml into reusable workflows

@gab-arrobo Let me know if this PR is what you are looking for: onosproject/.github#14

Hi @andybavier,
Sorry for the confusion. My mistake, I did not communicate my thoughts in a coherent way and I got confused with PR #230. Your PR is good as-is because it already calls the reusable workflows from onosproject/.github. So, there is no need for PR [onosproject/.github#14]. Again, sorry.

@andybavier andybavier merged commit 55f1d34 into onosproject:master Jan 22, 2026
7 checks passed
@andybavier andybavier deleted the docker-publish-gha branch January 22, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants