Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/build-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
architectures: ${{ steps.info.outputs.architectures }}
build_matrix: ${{ steps.matrix.outputs.matrix }}
image_name: ${{ steps.normalize.outputs.image_name }}
name: ${{ steps.normalize.outputs.name }}
description: ${{ steps.normalize.outputs.description }}
url: ${{ steps.normalize.outputs.url }}
registry_prefix: ${{ steps.normalize.outputs.registry_prefix }}
version: ${{ steps.normalize.outputs.version }}
steps:
Expand All @@ -34,12 +37,19 @@ jobs:
- name: Normalize app information
id: normalize
run: |
image="${{ steps.info.outputs.image }}"
image=${{ steps.info.outputs.image }}
echo "image_name=${image##*/}" >> "$GITHUB_OUTPUT"
echo "registry_prefix=${image%/*}" >> "$GITHUB_OUTPUT"
# Strip surrounding quotes that the info action includes from YAML string values
version="${{ steps.info.outputs.version }}"
echo "version=${version//[\"\']/}" >> "$GITHUB_OUTPUT"
version=${{ steps.info.outputs.version }}
echo "version=${version}" >> "$GITHUB_OUTPUT"
name=${{ steps.info.outputs.name }}
echo "name=${name}" >> "$GITHUB_OUTPUT"
description=${{ steps.info.outputs.description }}
echo "description=${description}" >> "$GITHUB_OUTPUT"
url=${{ steps.info.outputs.url }}
if [[ -n "$url" && "$url" != "null" ]]; then
echo "url=${url}" >> "$GITHUB_OUTPUT"
fi

- name: Prepare build matrix
id: matrix
Expand Down Expand Up @@ -76,6 +86,11 @@ jobs:
image-tags: |
${{ needs.prepare.outputs.version }}
latest
labels: |
io.hass.type=app
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why here and not in Dockerfile? Dockerfile would work for docker build too...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not entirely sure what's the correct way here - it was set by the legacy builder itself and it's also set by Supervisor when it's building an app locally, so it feels kinda redundant. The other io.hass.* labels must be injected externally anyway - this one is the only static, but it feels slightly better to keep them at one place.

io.hass.name=${{ needs.prepare.outputs.name }}
io.hass.description=${{ needs.prepare.outputs.description }}
${{ needs.prepare.outputs.url && format('io.hass.url={0}', needs.prepare.outputs.url) || '' }}
push: ${{ inputs.publish }}
version: ${{ needs.prepare.outputs.version }}

Expand Down
5 changes: 5 additions & 0 deletions example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<!-- https://developers.home-assistant.io/docs/apps/presentation#keeping-a-changelog -->
## 1.3.1

* Rebuild with updated workflow to include `io.hass.*` labels.
* Remove io.hass.type from Dockerfile, let build add it (with "app" value).

## 1.3.0

- Updated to Alpine 3.23 base image.
Expand Down
1 change: 0 additions & 1 deletion example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ RUN \
COPY rootfs /

LABEL \
io.hass.type="addon" \
org.opencontainers.image.title="Home Assistant App: Example app" \
org.opencontainers.image.description="Example app to use as a blueprint for new apps." \
org.opencontainers.image.source="https://github.com/home-assistant/apps-example" \
Expand Down
2 changes: 1 addition & 1 deletion example/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://developers.home-assistant.io/docs/apps/configuration#app-configuration
name: Example app
version: "1.3.0"
version: "1.3.1"
slug: example
description: Example app
url: "https://github.com/home-assistant/apps-example/tree/main/example"
Expand Down