Skip to content

Skip publishing if the version is already published - #6

Open
puddly wants to merge 2 commits into
devfrom
puddly/avoid-container-overwrite
Open

puddly wants to merge 2 commits into
devfrom
puddly/avoid-container-overwrite

Conversation

@puddly

@puddly puddly commented Nov 15, 2026

Copy link
Copy Markdown
Member

Addon releases are a bit strange: every merge to dev basically re-releases the current repo as the most recent release, overwriting the public image even if the version doesn't change. This means that we can't really develop in dev...

This PR skips replacing the Docker image if it already exists, so PRs that do not change config.yaml's version key do not re-publish. Supervisor will use the repos change log and README but that's a small price to pay.

Copilot AI balanced review requested due to automatic review settings November 15, 2026 16:00

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.

🟡 Changes recommended

Concurrent runs for the same app/version can both pass the publish check and overwrite released images and the manifest because the full publishing sequence is not serialized.

1 open issue
What changed in this PR

This PR aims to prevent development merges from overwriting published addon releases when the configured version has not changed.

Changes:

  • Checks whether the versioned Docker image already exists.
  • Passes the resulting publish decision to image builds and multi-architecture manifest publication.
File Description
.github/​workflows/​build-app.yaml Adds the image-existence check and gates publishing on its result.

Review effort: Balanced

VERSION: ${{ steps.normalize.outputs.version }}
PUBLISH: ${{ inputs.publish }}
run: |
if output=$(docker buildx imagetools inspect "${IMAGE}:${VERSION}" 2>&1); then
@zigpy-review-bot zigpy-review-bot added the code quality Improvement to code quality label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code quality Improvement to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants