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.
61 lines
2.2 KiB
YAML
61 lines
2.2 KiB
YAML
name: Validate
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
schedule:
|
|
# Catches HACS/hassfest rule changes without a push.
|
|
- 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
|
|
- uses: home-assistant/actions/hassfest@master
|
|
|
|
hacs:
|
|
name: HACS
|
|
if: ${{ github.server_url != 'https://git.arch.fyi' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: hacs/action@main
|
|
with:
|
|
category: integration
|
|
# This is distributed as a custom repository, not a default one, so
|
|
# the brands check (which requires a home-assistant/brands PR) is
|
|
# deliberately skipped.
|
|
ignore: brands
|
|
|
|
tests:
|
|
name: pytest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- run: pip install beautifulsoup4 pytest yarl
|
|
- run: pytest tests/ -q
|