Verify the active Python interpreter in Forgejo Actions
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
3o45d ca2b7a7533
All checks were successful
Test assert-python / unit (push) Successful in 21s
Published actions integration / independent-consumer (push) Successful in 24s
docs(actions): pin verified assert-python release
2026-10-01 19:39:23 +03:00
.forgejo/workflows ci(actions): add independent consumer probe 2026-10-01 19:29:50 +03:00
tests feat(actions): add reusable assert-python 2026-10-01 19:03:48 +03:00
action.yml feat(actions): add reusable assert-python 2026-10-01 19:03:48 +03:00
CHANGELOG.md ci(actions): prepare assert-python release checks 2026-10-01 19:18:13 +03:00
check.py feat(actions): add reusable assert-python 2026-10-01 19:03:48 +03:00
README.md docs(actions): pin verified assert-python release 2026-10-01 19:39:23 +03:00

assert-python

Composite action for Forgejo Actions. It fails at the setup boundary if setup-python left a different interpreter active. Requires Bash and python on the job runner; it neither installs Python nor caches dependencies.

Usage

steps:
  - uses: https://code.forgejo.org/actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
    with:
      python-version: '3.14'
  - uses: https://git.vexly.cc/actions/assert-python@c5098e5d5a97b074df8c06d31f917a922e971bf8
    with:
      version: '3.14'

The example pins release v0.1.0 to its reviewed full commit SHA. The action's version input accepts major.minor; malformed input exits 2, a mismatch exits 1, and an exact match exits 0. No checkout of the consumer repository is needed: the script is loaded from github.action_path.

To verify locally, run python -m unittest discover -s tests -v in this directory. In the consumer repository, verify both match and mismatch on a real Forgejo runner before changing required checks.

The published action passed matching/mismatching interpreter checks on Forgejo 16.0.5 / Runner 13.0.0 in TokenSell and an independent consumer. Both probes load the action without checking out TokenSell.