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
14 changes: 7 additions & 7 deletions .github/workflows/builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
id: changed_files
uses: jitterbit/get-changed-files@v1

- name: Find add-on directories
- name: Find app directories
id: addons
uses: home-assistant/actions/helpers/find-addons@master

- name: Get changed add-ons
- name: Get changed apps
id: changed_addons
run: |
declare -a changed_addons
Expand All @@ -50,17 +50,17 @@ jobs:
changed=$(echo ${changed_addons[@]} | rev | cut -c 2- | rev)

if [[ -n ${changed} ]]; then
echo "Changed add-ons: $changed";
echo "Changed apps: $changed";
echo "changed=true" >> $GITHUB_OUTPUT;
echo "addons=[$changed]" >> $GITHUB_OUTPUT;
else
echo "No add-on had any monitored files changed (${{ env.MONITORED_FILES }})";
echo "No app had any monitored files changed (${{ env.MONITORED_FILES }})";
fi
build:
needs: init
runs-on: ubuntu-latest
if: needs.init.outputs.changed == 'true'
name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on
name: Build ${{ matrix.arch }} ${{ matrix.addon }} app
strategy:
matrix:
addon: ${{ fromJson(needs.init.outputs.changed_addons) }}
Expand All @@ -79,7 +79,7 @@ jobs:
with:
path: "./${{ matrix.addon }}"

- name: Check if add-on should be built
- name: Check if app should be built
id: check
run: |
if [[ "${{ steps.info.outputs.image }}" == "null" ]]; then
Expand All @@ -104,7 +104,7 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build ${{ matrix.addon }} add-on
- name: Build ${{ matrix.addon }} app
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2026.02.1
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ on:

jobs:
find:
name: Find add-ons
name: Find apps
runs-on: ubuntu-latest
outputs:
addons: ${{ steps.addons.outputs.addons_list }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v6.0.2

- name: 🔍 Find add-on directories
- name: 🔍 Find app directories
id: addons
uses: home-assistant/actions/helpers/find-addons@master

lint:
name: Lint add-on ${{ matrix.path }}
name: Lint app ${{ matrix.path }}
runs-on: ubuntu-latest
needs: find
strategy:
Expand All @@ -35,7 +35,7 @@ jobs:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v6.0.2

- name: 🚀 Run Home Assistant Add-on Lint
- name: 🚀 Run Home Assistant App Lint
uses: frenck/action-addon-linter@v2.21
with:
path: "./${{ matrix.path }}"
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# Example Home Assistant add-on repository
# Example Home Assistant app repository

This repository can be used as a "blueprint" for add-on development to help you get started.
This repository can be used as a "blueprint" for app development to help you get started.

Add-on documentation: <https://developers.home-assistant.io/docs/add-ons>
Apps documentation: <https://developers.home-assistant.io/docs/apps>

[![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Faddons-example)
[![Open your Home Assistant instance and show the app store with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_store.svg)](https://my.home-assistant.io/redirect/supervisor_store/?repository_url=https%3A%2F%2Fgithub.com%2Fhome-assistant%2Fapps-example)

## Add-ons
## Apps

This repository contains the following add-ons
This repository contains the following apps

### [Example add-on](./example)
### [Example app](./example)

![Supports aarch64 Architecture][aarch64-shield]
![Supports amd64 Architecture][amd64-shield]

_Example add-on to use as a blueprint for new add-ons._
_Example app to use as a blueprint for new apps._

<!--

Notes to developers after forking or using the github template feature:
- While developing comment out the 'image' key from 'example/config.yaml' to make the supervisor build the addon
- While developing comment out the 'image' key from 'example/config.yaml' to make the supervisor build the app
- Remember to put this back when pushing up your changes.
- When you merge to the 'main' branch of your repository a new build will be triggered.
- Make sure you adjust the 'version' key in 'example/config.yaml' when you do that.
- Make sure you update 'example/CHANGELOG.md' when you do that.
- The first time this runs you might need to adjust the image configuration on github container registry to make it public
- You may also need to adjust the github Actions configuration (Settings > Actions > General > Workflow > Read & Write)
- You may also need to adjust the GitHub Actions configuration (Settings > Actions > General > Workflow > Read & Write)
- Adjust the 'image' key in 'example/config.yaml' so it points to your username instead of 'home-assistant'.
- This is where the build images will be published to.
- Rename the example directory.
Expand Down
6 changes: 5 additions & 1 deletion example/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->
<!-- https://developers.home-assistant.io/docs/apps/presentation#keeping-a-changelog -->
## 1.3.0

- Updated to Alpine 3.23 base image.
- Renamed from "add-on" to "app".

## 1.2.0

Expand Down
8 changes: 4 additions & 4 deletions example/DOCS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Home Assistant Add-on: Example add-on
# Home Assistant App: Example app

## How to use

This add-on really does nothing. It is just an example.
This app really does nothing. It is just an example.

When started it will print the configured message or "Hello world" in the log.

It will also print "All done!" in `/share/example_addon_output.txt` to show
simple example of the usage of `map` in addon config.
It will also print "All done!" in `/share/example_app_output.txt` to show
simple example of the usage of `map` in app config.
2 changes: 1 addition & 1 deletion example/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile
# https://developers.home-assistant.io/docs/apps/configuration#app-dockerfile
ARG BUILD_FROM
FROM $BUILD_FROM

Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Home Assistant Add-on: Example add-on
# Home Assistant App: Example app

_Example add-on to use as a blueprint for new add-ons._
_Example app to use as a blueprint for new apps._

![Supports aarch64 Architecture][aarch64-shield]
![Supports amd64 Architecture][amd64-shield]
Expand Down
8 changes: 4 additions & 4 deletions example/apparmor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ profile example flags=(attach_disconnected,mediate_deleted) {
/usr/lib/bashio/** ix,
/tmp/** rwk,

# Access to options.json and other files within your addon
# Access to options.json and other files within your app
/data/** rw,

# Start new profile for service
Expand All @@ -36,7 +36,7 @@ profile example flags=(attach_disconnected,mediate_deleted) {
# Receive signals from S6-Overlay
signal (receive) peer=*_example,

# Access to options.json and other files within your addon
# Access to options.json and other files within your app
/data/** rw,

# Access to mapped volumes specified in config.json
Expand All @@ -45,7 +45,7 @@ profile example flags=(attach_disconnected,mediate_deleted) {
# Access required for service functionality
# Note: List was built by doing the following:
# 1. Add what is obviously needed based on what is in the script
# 2. Add `complain` as a flag to this profile temporarily and run the addon
# 2. Add `complain` as a flag to this profile temporarily and run the app
# 3. Review the audit log with `journalctl _TRANSPORT="audit" -g 'apparmor="ALLOWED"'` and add other access as needed
# Remember to remove the `complain` flag when you are done
/usr/bin/my_program r,
Expand All @@ -54,4 +54,4 @@ profile example flags=(attach_disconnected,mediate_deleted) {
/etc/passwd r,
/dev/tty rw,
}
}
}
12 changes: 6 additions & 6 deletions example/build.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-dockerfile
# https://developers.home-assistant.io/docs/apps/configuration#app-dockerfile
build_from:
aarch64: "ghcr.io/home-assistant/aarch64-base:3.15"
amd64: "ghcr.io/home-assistant/amd64-base:3.15"
aarch64: "ghcr.io/home-assistant/aarch64-base:3.23"
amd64: "ghcr.io/home-assistant/amd64-base:3.23"
labels:
org.opencontainers.image.title: "Home Assistant Add-on: Example add-on"
org.opencontainers.image.description: "Example add-on to use as a blueprint for new add-ons."
org.opencontainers.image.source: "https://github.com/home-assistant/addons-example"
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"
org.opencontainers.image.licenses: "Apache License 2.0"
args:
TEMPIO_VERSION: "2021.09.0"
12 changes: 6 additions & 6 deletions example/config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
name: Example add-on
version: "1.2.0"
# https://developers.home-assistant.io/docs/apps/configuration#app-configuration
name: Example app
version: "1.3.0"
slug: example
description: Example add-on
url: "https://github.com/home-assistant/addons-example/tree/main/example"
description: Example app
url: "https://github.com/home-assistant/apps-example/tree/main/example"
arch:
- aarch64
- amd64
Expand All @@ -14,4 +14,4 @@ options:
message: "Hello world..."
schema:
message: "str?"
image: "ghcr.io/home-assistant/{arch}-addon-example"
image: "ghcr.io/home-assistant/{arch}-app-example"
2 changes: 1 addition & 1 deletion example/rootfs/etc/services.d/example/finish
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
declare APP_EXIT_CODE=${1}

if [[ "${APP_EXIT_CODE}" -ne 0 ]] && [[ "${APP_EXIT_CODE}" -ne 256 ]]; then
bashio::log.warning "Halt add-on with exit code ${APP_EXIT_CODE}"
bashio::log.warning "Halt app with exit code ${APP_EXIT_CODE}"
echo "${APP_EXIT_CODE}" > /run/s6-linux-init-container-results/exitcode
exec /run/s6/basedir/bin/halt
fi
Expand Down
2 changes: 1 addition & 1 deletion example/rootfs/usr/bin/my_program
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

echo "All done!" > /share/example_addon_output.txt
echo "All done!" > /share/example_app_output.txt
2 changes: 1 addition & 1 deletion example/translations/en.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configuration:
message:
name: Message
description: The message that will be printed to the log when starting this example add-on.
description: The message that will be printed to the log when starting this example app.
8 changes: 4 additions & 4 deletions repository.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://developers.home-assistant.io/docs/add-ons/repository#repository-configuration
name: Example Home Assistant add-on repository
url: 'https://github.com/home-assistant/addons-example'
maintainer: Awesome Maintainer <awesome@example.com>
# https://developers.home-assistant.io/docs/apps/repository#repository-configuration
name: Example Home Assistant app repository
url: 'https://github.com/home-assistant/apps-example'
maintainer: Awesome Maintainer <awesome@example.com>
Loading