mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-04 00:43:34 +02:00
Remove temporary migration validation workflow
This commit is contained in:
95
.github/workflows/agent-migrate-app-config.yml
vendored
95
.github/workflows/agent-migrate-app-config.yml
vendored
@@ -1,95 +0,0 @@
|
||||
---
|
||||
name: Validate add-on config map migration
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- agent/support-app-config-linter
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout migration branch
|
||||
uses: actions/checkout@v7.0.1
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Validate repository migration
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
git diff --check "${{ github.event.pull_request.base.sha }}...HEAD"
|
||||
|
||||
if git grep -n addon_config -- ':!.github/workflows/agent-migrate-app-config.yml'; then
|
||||
echo "Legacy map-name references remain outside the temporary validation workflow" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
changed_configs=$(git diff --name-only "${{ github.event.pull_request.base.sha }}...HEAD" | grep -Ec '^[^/]+/config\.(json|ya?ml)$' || true)
|
||||
changed_changelogs=$(git diff --name-only "${{ github.event.pull_request.base.sha }}...HEAD" | grep -Ec '^[^/]+/CHANGELOG\.md$' || true)
|
||||
if [ "$changed_configs" -eq 0 ]; then
|
||||
echo "No add-on manifests changed" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ "$changed_changelogs" -lt "$changed_configs" ]; then
|
||||
echo "Fewer changelogs than changed add-on manifests: $changed_changelogs < $changed_configs" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Changed add-on manifests: $changed_configs"
|
||||
echo "Changed add-on changelogs: $changed_changelogs"
|
||||
|
||||
- name: Run compatibility normalizer unit tests
|
||||
run: python3 .github/scripts/test_prepare_addon_lint_config.py
|
||||
|
||||
- name: Create current-schema linter fixtures
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p .tmp-addon-linter-short .tmp-addon-linter-long
|
||||
|
||||
cat > .tmp-addon-linter-short/config.yaml <<'SHORT_FIXTURE'
|
||||
---
|
||||
name: App Config Short Form Fixture
|
||||
version: "1.0.0"
|
||||
slug: app_config_short_fixture
|
||||
description: Validates current Home Assistant short-form app map names
|
||||
arch:
|
||||
- amd64
|
||||
map:
|
||||
- app_config:rw
|
||||
- all_app_configs:ro
|
||||
SHORT_FIXTURE
|
||||
|
||||
cat > .tmp-addon-linter-long/config.yaml <<'LONG_FIXTURE'
|
||||
---
|
||||
name: App Config Long Form Fixture
|
||||
version: "1.0.0"
|
||||
slug: app_config_long_fixture
|
||||
description: Validates current Home Assistant long-form app map names
|
||||
arch:
|
||||
- amd64
|
||||
map:
|
||||
- type: app_config
|
||||
read_only: false
|
||||
- type: all_app_configs
|
||||
read_only: true
|
||||
LONG_FIXTURE
|
||||
|
||||
- name: Verify short-form current map names through upstream linter
|
||||
uses: ./.github/actions/addon-linter
|
||||
with:
|
||||
path: ./.tmp-addon-linter-short
|
||||
|
||||
- name: Verify long-form current map names through upstream linter
|
||||
uses: ./.github/actions/addon-linter
|
||||
with:
|
||||
path: ./.tmp-addon-linter-long
|
||||
Reference in New Issue
Block a user