diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml deleted file mode 100644 index 8a93b37..0000000 --- a/.github/workflows/builder.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Build images - -# yamllint disable-line rule:truthy -on: - workflow_dispatch: - inputs: - version: - description: Which core version should be used as base image - required: true - -env: - REGISTRY: ghcr.io - HASSFEST_IMAGE_NAME: ${{ github.repository }}/hassfest - HASSFEST_IMAGE_TAG: ${{ env.HASSFEST_IMAGE_NAME }}:latest - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - attestations: write - id-token: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build Docker image - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 - with: - context: ./hassfest - build-args: FROM_VERSION=${{ version }} - load: true - tags: ${{ env.HASSFEST_IMAGE_TAG }} - - # todo test with core - - name: Checkout core repository - uses: actions/checkout@v4 - with: - name: home-assistant/core - path: tmp/core - - - name: Run hassfest againt core - run: docker run --rm -v ${{ github.workspace }}/tmp/core://github/workspace ${{ env.REGISTRY }}/${{ env.HASSFEST_IMAGE_TAG }} - - - name: Push Docker image - id: push - uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 - with: - context: ./hassfest - build-args: FROM_VERSION=${{ version }} - push: true - tags: ${{ env.HASSFEST_IMAGE_TAG }} - - - name: Generate artifact attestation - uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2 - with: - subject-name: ${{ env.REGISTRY }}/${{ env.HASSFEST_IMAGE_NAME }} - subject-digest: ${{ steps.push.outputs.digest }} - push-to-registry: true - \ No newline at end of file diff --git a/hassfest/Dockerfile b/hassfest/Dockerfile deleted file mode 100644 index 652c732..0000000 --- a/hassfest/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -ARG FROM_VERSION=beta -FROM ghcr.io/home-assistant/home-assistant:${FROM_VERSION} - -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -COPY entrypoint.sh /entrypoint.sh - -RUN \ - uv pip install stdlib-list==0.10.0 \ - $(grep -e "^pipdeptree" -e "^tqdm" /usr/src/homeassistant/requirements_test.txt) \ - $(grep -e "^ruff" /usr/src/homeassistant/requirements_test_pre_commit.txt) - -WORKDIR "/github/workspace" -ENTRYPOINT ["/entrypoint.sh"] - -LABEL "name"="hassfest" -LABEL "maintainer"="Home Assistant " -LABEL "version"="1.1" - -LABEL "com.github.actions.name"="hassfest" -LABEL "com.github.actions.description"="Run hassfest to validate standalone integration repositories" -LABEL "com.github.actions.icon"="terminal" -LABEL "com.github.actions.color"="gray-dark" diff --git a/hassfest/action.yml b/hassfest/action.yml index d476ad1..4f46ae0 100644 --- a/hassfest/action.yml +++ b/hassfest/action.yml @@ -8,8 +8,4 @@ runs: - shell: bash run: | - docker build ${{ github.action_path }} -f ${{ github.action_path }}/Dockerfile -t hassfest - - - shell: bash - run: | - docker run --rm -v ${{ github.workspace }}://github/workspace hassfest + docker run --rm -v ${{ github.workspace }}://github/workspace ghcr.io/home-assistant/hassfest diff --git a/hassfest/entrypoint.sh b/hassfest/entrypoint.sh deleted file mode 100755 index c45fcf2..0000000 --- a/hassfest/entrypoint.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bashio -declare -a integrations -declare integration_path - -shopt -s globstar nullglob -for manifest in **/manifest.json; do - manifest_path=$(realpath "${manifest}") - integrations+=(--integration-path "${manifest_path%/*}") -done - -if [[ ${#integrations[@]} -eq 0 ]]; then - bashio::exit.nok "No integrations found!" -fi - -cd /usr/src/homeassistant -exec python3 -m script.hassfest --action validate "${integrations[@]}" \ No newline at end of file