diff --git a/.github/workflows/additional-tags.yaml b/.github/workflows/additional-tags.yaml index 1ceac32..0aaceac 100644 --- a/.github/workflows/additional-tags.yaml +++ b/.github/workflows/additional-tags.yaml @@ -17,6 +17,6 @@ jobs: runs-on: ubuntu-latest steps: - name: โคต๏ธ Check out code from GitHub - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.2.2 - name: ๐Ÿš€ Run Release Tracker uses: vweevers/additional-tags-action@v2.0.0 diff --git a/.github/workflows/labels.yaml b/.github/workflows/labels.yaml index 1e8331a..ea110c3 100644 --- a/.github/workflows/labels.yaml +++ b/.github/workflows/labels.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - name: โคต๏ธ Check out code from GitHub - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.2.2 - name: ๐Ÿš€ Run Label Syncer uses: micnncim/action-label-syncer@v1.3.0 env: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 5b402fe..43b38ce 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -10,16 +10,16 @@ jobs: runs-on: ubuntu-latest steps: - name: โคต๏ธ Check out code from GitHub - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.2.2 - name: ๐Ÿš€ Run yamllint - uses: frenck/action-yamllint@v1.4 + uses: frenck/action-yamllint@v1.5 json: name: JSON Lint runs-on: ubuntu-latest steps: - name: โคต๏ธ Check out code from GitHub - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.2.2 - name: ๐Ÿš€ Run JQ run: | shopt -s globstar @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - name: โคต๏ธ Check out code from GitHub - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4.2.2 - name: ๐Ÿš€ Run Prettier uses: creyD/prettier_action@v4.3 with: diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml index 14f4a6b..60a5f7f 100644 --- a/.github/workflows/lock.yaml +++ b/.github/workflows/lock.yaml @@ -12,7 +12,7 @@ jobs: name: ๐Ÿ”’ Lock closed issues and PRs runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v4.0.1 + - uses: dessant/lock-threads@v5.0.1 with: github-token: ${{ github.token }} issue-inactive-days: "30" diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml index b57928d..786560a 100644 --- a/.github/workflows/release-drafter.yaml +++ b/.github/workflows/release-drafter.yaml @@ -13,6 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - name: ๐Ÿš€ Run Release Drafter - uses: release-drafter/release-drafter@v5.25.0 + uses: release-drafter/release-drafter@v6.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index 283881a..aca2dfe 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: ๐Ÿš€ Run stale - uses: actions/stale@v8.0.0 + uses: actions/stale@v9.1.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 30 diff --git a/src/Dockerfile b/src/Dockerfile index 18271c9..07c1e38 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-alpine +FROM python:3.13-alpine COPY requirements.txt /tmp/ diff --git a/src/build.schema.json b/src/build.schema.json index 5e2974a..ba1bbbb 100644 --- a/src/build.schema.json +++ b/src/build.schema.json @@ -15,27 +15,27 @@ "properties": { "aarch64": { "default": "homeassistant/aarch64-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "amd64": { "default": "homeassistant/amd64-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "armhf": { "default": "homeassistant/armhf-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "armv7": { "default": "homeassistant/armv7-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" }, "i386": { "default": "homeassistant/i386-base:latest", - "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?([\\-\\w{}]+)/([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", + "pattern": "^([a-zA-Z\\-\\.:\\d{}]+/)*?(([\\-\\w{}]+)/)?([\\-\\w{}]+)(:[\\.\\-\\w{}]+)?$", "type": "string" } }, diff --git a/src/config.schema.json b/src/config.schema.json index e301679..a9343c6 100644 --- a/src/config.schema.json +++ b/src/config.schema.json @@ -48,9 +48,15 @@ }, "boot": { "default": "auto", - "enum": ["auto", "manual"], + "enum": ["auto", "manual", "manual_only"], "type": "string" }, + "breaking_versions": { + "items": { + "type": "string" + }, + "type": "array" + }, "codenotary": { "type": "string", "format": "email" @@ -123,6 +129,10 @@ "default": false, "type": "boolean" }, + "host_uts": { + "default": false, + "type": "boolean" + }, "image": { "type": "string" }, @@ -166,10 +176,45 @@ "type": "array" }, "map": { - "items": { - "pattern": "^(addon_config|all_addon_configs|config|homeassistant_config|ssl|addons|backup|share|media)(:(rw|ro))?$" - }, - "type": "array" + "type": "array", + "oneOf": [ + { + "items": { + "type": "string", + "pattern": "^(addon_config|all_addon_configs|config|homeassistant_config|ssl|addons|backup|share|media)(:(rw|ro))?$" + } + }, + { + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "addon_config", + "addons", + "all_addon_configs", + "backup", + "config", + "data", + "homeassistant_config", + "media", + "share", + "ssl" + ] + }, + "read_only": { + "type": "boolean" + }, + "path": { + "type": "string" + } + }, + "required": ["type"], + "additionalProperties": false + } + } + ] }, "name": { "type": "string" diff --git a/src/lint.py b/src/lint.py index 880bbf5..274f8d8 100644 --- a/src/lint.py +++ b/src/lint.py @@ -133,6 +133,41 @@ def is_default(validator, properties, instance, schema): f"::warning file={config}::'map' contains the 'config' folder, which has been replaced by 'homeassistant_config'. See: https://developers.home-assistant.io/blog/2023/11/06/public-addon-config" ) +if ( + configuration.get("map") + and ( + "config" in configuration["map"] + or "config:rw" in configuration["map"] + or "config:ro" in configuration["map"] + ) + and ( + "homeassistant_config" in configuration["map"] + or "homeassistant_config:rw" in configuration["map"] + or "homeassistant_config:ro" in configuration["map"] + ) +): + print( + f"::error file={config}::'map' contains both the 'config' and 'homeassistant_config' folder, which are conflicting. See: https://developers.home-assistant.io/blog/2023/11/06/public-addon-config" + ) + exit_code = 1 + +if ( + configuration.get("map") + and ( + "config" in configuration["map"] + or "config:rw" in configuration["map"] + or "config:ro" in configuration["map"] + ) + and ( + "addon_config" in configuration["map"] + or "addon_config:rw" in configuration["map"] + or "addon_config:ro" in configuration["map"] + ) +): + print( + f"::error file={config}::'map' contains both the 'config' and 'addon_config' folder, which are conflicting. See: https://developers.home-assistant.io/blog/2023/11/06/public-addon-config" + ) + exit_code = 1 # Checks regarding build file(if found) for file_type in ("json", "yaml", "yml"): diff --git a/src/requirements.txt b/src/requirements.txt index cdd5b9f..b8ee4f9 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -1,2 +1,2 @@ -jsonschema==4.19.2 -pyyaml==6.0.1 +jsonschema==4.23.0 +pyyaml==6.0.2