From e31f84e40b189b0cfce3c6d6e0f966e058916510 Mon Sep 17 00:00:00 2001 From: flan Date: Tue, 4 Aug 2026 14:22:06 +0000 Subject: [PATCH] Run hassfest and HACS only where they can work Both jobs fail on the Gitea mirror for reasons no secret or input changes. hassfest is a Docker-container action that bind-mounts $GITHUB_WORKSPACE. The Gitea runner runs the job inside a container against a separate docker-in-docker daemon, so the path resolves on the daemon's filesystem, not the job's; docker creates an empty directory and mounts that, and hassfest then accurately reports that it found no integrations in the empty tree it was given. It takes no token, so credentials were never the issue. HACS asks the github.com API about github.repository, which on Gitea is flan/ha-freshharvest -- a slug that exists only on Gitea. That is the 401. The action has no input to point the lookup at the sudolulo mirror. The same commit that fails here passes on github.com/sudolulo/ha-freshharvest, which mirrors every push, so the validation still happens -- it just happens where it is capable of running. The guard is "not Gitea" rather than "is GitHub" so an unexpected server_url runs the checks instead of dropping them. pytest is untouched and still gates every push on both forges. --- .github/workflows/validate.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 70b5e26..118f05e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -8,9 +8,27 @@ on: - cron: "0 6 * * 1" workflow_dispatch: +# hassfest and HACS run on GitHub ONLY, and are skipped on the Gitea mirror of this repo. +# Neither can work there, for reasons no input or secret changes: +# +# hassfest is a Docker-container action that bind-mounts $GITHUB_WORKSPACE. The Gitea runner +# executes the job inside a container against a SEPARATE docker-in-docker daemon, so that path +# is resolved on the daemon's filesystem rather than the job's; docker helpfully creates an +# empty directory and mounts that, and hassfest then correctly reports "No integrations found!" +# about a tree it was handed empty. It needs no token, so no credential fixes it. +# +# HACS asks the github.com API about ${{ github.repository }}. On Gitea that is +# "flan/ha-freshharvest", which exists only on Gitea — hence the 401. The GitHub mirror is +# sudolulo/ha-freshharvest, and hacs/action has no input to redirect the lookup. +# +# Nothing is lost by skipping them here: github.com/sudolulo/ha-freshharvest is a live mirror and +# runs both jobs green on every push. The condition is written as "not Gitea" rather than +# "is GitHub" on purpose, so an unexpected server_url still RUNS the checks instead of quietly +# dropping them. jobs: hassfest: name: hassfest + if: ${{ github.server_url != 'https://git.arch.fyi' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,6 +36,7 @@ jobs: hacs: name: HACS + if: ${{ github.server_url != 'https://git.arch.fyi' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4