From 3aa24048931785dbbe5760e9b2d3779c4c239c44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Thu, 11 Jun 2026 10:32:33 +0200 Subject: [PATCH] Add landingpage type to the version helper The home-assistant/landingpage repo used landingpage as the release type, however it was not set and it resulted in tagged images not being published. Add a dedicated handling and readme section for that type here. --- helpers/version/README.md | 29 +++++++++++++++++++++++++---- helpers/version/action.yml | 12 +++++++----- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/helpers/version/README.md b/helpers/version/README.md index 72d6e76..3ff6e21 100644 --- a/helpers/version/README.md +++ b/helpers/version/README.md @@ -6,7 +6,7 @@ Determines **version**, **stability**, **channel**, and **publish** status for H | Input | Required | Default | Description | |--------|----------|-----------|----------------------------------------------------------| -| `type` | no | `generic` | Target type: `core`, `supervisor`, `plugin`, or `generic` | +| `type` | no | `generic` | Target type: `core`, `supervisor`, `plugin`, `generic`, or `landingpage` | ## Outputs @@ -52,6 +52,27 @@ These two types produce identical outputs. --- +## Build Type: `landingpage` + +Used for the landingpage image, which is pushed as a tag on the existing +`*-homeassistant` images. Version and channel resolve exactly like +`plugin`/`supervisor`, but - like `core` - it is **only published on a release +tag**, never on a push/merge to the default branch. + +| Trigger | version | stable | channel | publish | +|----------------------|----------------------------------|---------|---------|---------| +| **Pull Request** | `` | `false` | `dev` | `false` | +| **Push to master** | CalVer dev `YYYY.MM.X.devDDNN` | `false` | `dev` | `false` | +| **Release (tag)** | Tag name (e.g. `2024.12.1`) | `true` | `beta` | `true` | +| **Push to tag** | Tag name | `false` | `dev` | `false` | +| **workflow_dispatch** | From inputs or ref | From inputs or `false` | From inputs or computed | From inputs or `false` | + +### Notes +- **Only releases are published.** Pushes (including merges to the default branch), PRs, and other events all produce `publish=false`. +- The image is always pushed under the `landingpage` tag; the resolved `version` is only used as the image version label. + +--- + ## Build Type: `core` | Trigger | version | stable | channel | publish | @@ -97,9 +118,9 @@ These two types produce identical outputs. github.event.inputs.version set? ├─ YES → use that value └─ NO - ├─ ref is master/main AND type is supervisor/plugin/generic? + ├─ ref is master/main AND type is supervisor/plugin/generic/landingpage? │ └─ YES → CalVer dev: YYYY.MM.X.devDDNN - ├─ ref is "merge" AND type is supervisor/plugin/generic? + ├─ ref is "merge" AND type is supervisor/plugin/generic/landingpage? │ └─ YES → commit SHA ├─ ref is "dev" AND type is core? │ └─ YES → nightly bump via version_bump.py @@ -108,7 +129,7 @@ github.event.inputs.version set? ## CalVer Dev Version Format -Used by `supervisor`, `plugin`, and `generic` on pushes to master/main: +Used by `supervisor`, `plugin`, `generic`, and `landingpage` on pushes to master/main: ``` YYYY.MM.N.devDDNN diff --git a/helpers/version/action.yml b/helpers/version/action.yml index 70270d0..19e6f00 100644 --- a/helpers/version/action.yml +++ b/helpers/version/action.yml @@ -2,7 +2,7 @@ name: 'Home Assistant helper: version' description: 'GitHub action helper: version' inputs: type: - description: The type of target to check against (core, supervisor, plugin, generic) + description: The type of target to check against (core, supervisor, plugin, generic, landingpage) required: false default: 'generic' outputs: @@ -50,7 +50,7 @@ runs: if [[ ! -z "$GITHUB_EVENT_INPUTS_VERSION" ]]; then version="$GITHUB_EVENT_INPUTS_VERSION" - elif [[ "${version}" =~ (master|main) && "$INPUTS_TYPE" =~ (supervisor|plugin|generic) ]]; then + elif [[ "${version}" =~ (master|main) && "$INPUTS_TYPE" =~ (supervisor|plugin|generic|landingpage) ]]; then today="$(date --utc '+%Y-%m-%d')" midnight_timestamp="$(date --utc +%s --date=$today)" calver_date="$(date --utc --date=$today '+%Y.%m')" @@ -64,7 +64,7 @@ runs: calver_dev="$(date --utc --date=$today '+.dev%d')$(printf "%02d" ${commit_count})" version="${base_ver}${calver_dev}" - elif [[ "${version}" == "merge" && "$INPUTS_TYPE" =~ (supervisor|plugin|generic) ]]; then + elif [[ "${version}" == "merge" && "$INPUTS_TYPE" =~ (supervisor|plugin|generic|landingpage) ]]; then version="${{ github.sha }}" elif [[ "${version}" == "dev" && "$INPUTS_TYPE" == "core" ]]; then @@ -95,7 +95,7 @@ runs: if [[ ! -z "$GITHUB_EVENT_INPUTS_CHANNEL" ]]; then echo "channel=$GITHUB_EVENT_INPUTS_CHANNEL" >> "$GITHUB_OUTPUT" - elif [[ "$INPUTS_TYPE" =~ (plugin|supervisor) ]]; then + elif [[ "$INPUTS_TYPE" =~ (plugin|supervisor|landingpage) ]]; then if [[ "${{ steps.version.outputs.stable }}" == "true" ]]; then echo "channel=beta" >> "$GITHUB_OUTPUT" else @@ -132,7 +132,9 @@ runs: echo "publish=false" >> "$GITHUB_OUTPUT" fi - elif [[ "$INPUTS_TYPE" == "core" ]]; then + # landingpage resolves version/channel like supervisor/plugin, but is only + # ever published from a release tag - never on push/merge to the default branch. + elif [[ "$INPUTS_TYPE" =~ (core|landingpage) ]]; then if [[ "$EVENT_NAME" == "release" ]]; then echo "publish=true" >> "$GITHUB_OUTPUT" else