Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# actionlint 1.7.12 and older don't know `$/` refs yet and flag them as a
# missing ref. check_suite.py makes sure our own actions go through `$/`.
paths:
.github/workflows/**/*.{yml,yaml}:
ignore:
- 'specifying action "\$/\.github/actions/[^"]+" in invalid format because ref is missing'
25 changes: 23 additions & 2 deletions .github/scripts/check_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
breaks on the next tag and nothing notices before then.
2. The jobs holding required-check names can't be skipped, and no other job
uses those names. A skipped job reports Success to branch protection.
3. Steps call this repo's own actions through `$/`. A consumer that requires
SHA-pinned actions refuses a tag ref, and `./` means the consumer's checkout.
"""

import sys
Expand All @@ -14,6 +16,7 @@
import yaml

WORKFLOWS = Path(".github/workflows")
ACTIONS = Path(".github/actions")
SUITE = "_python-react-tests.yml"
CALLERS = ("python-react-ci.yml", "python-react-publish.yml")
# keeper job id -> (required name, jobs it must wait for)
Expand Down Expand Up @@ -101,12 +104,30 @@ def check_keepers() -> list[str]:
return problems


def check_action_refs() -> list[str]:
problems: list[str] = []
files = sorted(WORKFLOWS.glob("*.yml")) + sorted(ACTIONS.glob("*/action.yml"))
for path in files:
doc = yaml.safe_load(path.read_text(encoding="utf-8"))
steps = [
s for job in doc.get("jobs", {}).values() for s in job.get("steps", [])
]
steps += doc.get("runs", {}).get("steps", [])
for step in steps:
uses = str(step.get("uses", ""))
if ".github/actions/" in uses and not uses.startswith("$/"):
problems.append(f"{path}: {uses} has to be $/.github/actions/...")
return problems


def main() -> int:
problems = check_plumbing() + check_keepers()
problems = check_plumbing() + check_keepers() + check_action_refs()
for problem in problems:
print(f"::error::{problem}")
if not problems:
print("OK: suite inputs plumbed through, keepers can't be skipped")
print(
"OK: suite inputs plumbed through, keepers can't be skipped, own actions via $/"
)
return 1 if problems else 0


Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_python-react-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ jobs:

- name: Every test module ran exactly once
if: inputs.backend-test-shards > 1
uses: homelabforge/shared-workflows/.github/actions/verify-pytest-shards@v1.7.0-rc1
uses: $/.github/actions/verify-pytest-shards
with:
reports-dir: shard-reports
count: ${{ inputs.backend-test-shards }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/python-react-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Reusable Python+React CI
#
# jobs:
# ci:
# uses: homelabforge/shared-workflows/.github/workflows/python-react-ci.yml@v1.7.0-rc1
# uses: homelabforge/shared-workflows/.github/workflows/python-react-ci.yml@v1.7.0-rc2
# with:
# enable-translations: true
# security-tripwire-script: .github/scripts/security-tripwire.sh
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
# local path resolves against the CONSUMER repo (which has no such file)
# when this reusable workflow is called cross-repo, causing a 0s
# startup_failure. Bump the @ref on every release.
uses: homelabforge/shared-workflows/.github/workflows/_python-react-tests.yml@v1.7.0-rc1
uses: homelabforge/shared-workflows/.github/workflows/_python-react-tests.yml@v1.7.0-rc2
with:
python-version: ${{ inputs.python-version }}
bun-version-file: ${{ inputs.bun-version-file }}
Expand Down Expand Up @@ -281,7 +281,7 @@ jobs:

- name: Every test module ran exactly once
if: inputs.pg-migrations-shards > 1
uses: homelabforge/shared-workflows/.github/actions/verify-pytest-shards@v1.7.0-rc1
uses: $/.github/actions/verify-pytest-shards
with:
reports-dir: shard-reports
count: ${{ inputs.pg-migrations-shards }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-react-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
# Full owner/repo path pinned to this release's own tag — a `./` local path
# resolves against the CONSUMER repo when called cross-repo (0s
# startup_failure). Bump the @ref on every release.
uses: homelabforge/shared-workflows/.github/workflows/_python-react-tests.yml@v1.7.0-rc1
uses: homelabforge/shared-workflows/.github/workflows/_python-react-tests.yml@v1.7.0-rc2
with:
python-version: ${{ inputs.python-version }}
bun-version-file: ${{ inputs.bun-version-file }}
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Release
#
# Two gates, mirroring the app repos (which gate `release` on `tests`):
# 1. ref-lockstep: every internal `homelabforge/shared-workflows/...@<ref>`
# pin must equal the tag: the `_python-react-tests.yml` calls in the
# CI/publish workflows and, since v1.7.0, the verify-pytest-shards action
# in the suite and the PG job. A `./` path can't be used (it
# pin must equal the tag; today that's the `_python-react-tests.yml`
# calls in the CI/publish workflows. Our own actions go through `$/` and
# have no ref. A `./` path can't be used (it
# startup-fails cross-repo — broke v1.4.0), so the pin must be bumped every
# release; forgetting it makes the tag silently ship the OLD suite. This
# gate fails the release if the refs drift. (Was release-tag-guard.yml.)
Expand Down Expand Up @@ -40,11 +40,14 @@ jobs:
.github/workflows/python-react-ci.yml \
.github/workflows/python-react-publish.yml \
.github/workflows/_python-react-tests.yml; do
# Every `uses:` back into this repo has to name the tag being cut:
# the nested test suite and the verify-pytest-shards action alike.
# Every `uses:` back into this repo has to name the tag being cut.
# Anchored on real `uses:` lines so a comment can't satisfy it.
refs=$(grep -E '^[[:space:]-]*uses:[[:space:]]*homelabforge/shared-workflows/' "$f" \
| grep -oE '@[^[:space:]]+' | sed 's/^@//' || true)
# The suite calls nothing back here today; the callers always do.
if [ -z "$refs" ] && [ "$f" = .github/workflows/_python-react-tests.yml ]; then
continue
fi
if [ -z "$refs" ]; then
echo "::error file=$f::no homelabforge/shared-workflows/...@<ref> found (expected refs pinned to $TAG)"
status=1
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.7.0-rc2] - 2026-10-06

### Fixed
- The shard verify step calls its action through `$/`, so it runs in repos that require SHA-pinned actions (needs runner 2.336.0+).

## [1.7.0-rc1] - 2026-10-06

### Added
Expand Down
Loading