feat: python-test, security-scan, docker-publish and auto-tag actions #1

Merged
tim merged 6 commits from feat/initial-actions into main 2026-10-12 09:28:38 +00:00
Owner

First set of shared composite actions.

Actions

Action Does
python-test venv, install project, ruff check, ruff format --check, pytest
security-scan bandit, pip-audit, gitleaks (release checksum verified)
docker-publish multi-arch buildx build and push to this Forgejo's registry, tags from the git ref
auto-tag create vX.Y.Z from pyproject.toml when the CHANGELOG has a matching entry

Plus templates/ starters, a README with the conventions, and fixtures/ the repo tests itself against (.forgejo/workflows/ci.yml).

How uses: resolves on this instance

Verified with probe workflows (removed here):

  • https://git.timstoop.nl/tim/workflow-basics/<action>@ref works.
  • ./<action> works (used by the self-tests).
  • tim/workflow-basics/<action>@ref fails.

Tested

  • Locally in python:3.14-slim, running each action's real steps: python-test (lint and test pass), auto-tag (dry run), security-scan (bandit, pip-audit, gitleaks incl. checksum check).
  • docker-publish has not run yet; this MR's CI is its first test (build only, push: "false").

Conventions

  • Secret is the global REPO_WRITER_PAT, passed in explicitly by callers.
  • No hardcoded hostname (registry from github.server_url).
  • Callers pin @v1. After merging I create tag v1.0.0 and v1.

Generated with Claude Code

First set of shared composite actions. ## Actions | Action | Does | |---|---| | `python-test` | venv, install project, `ruff check`, `ruff format --check`, `pytest` | | `security-scan` | bandit, pip-audit, gitleaks (release checksum verified) | | `docker-publish` | multi-arch `buildx` build and push to this Forgejo's registry, tags from the git ref | | `auto-tag` | create `vX.Y.Z` from `pyproject.toml` when the CHANGELOG has a matching entry | Plus `templates/` starters, a README with the conventions, and `fixtures/` the repo tests itself against (`.forgejo/workflows/ci.yml`). ## How `uses:` resolves on this instance Verified with probe workflows (removed here): - `https://git.timstoop.nl/tim/workflow-basics/<action>@ref` works. - `./<action>` works (used by the self-tests). - `tim/workflow-basics/<action>@ref` fails. ## Tested - Locally in `python:3.14-slim`, running each action's real steps: `python-test` (lint and test pass), `auto-tag` (dry run), `security-scan` (bandit, pip-audit, gitleaks incl. checksum check). - `docker-publish` has not run yet; this MR's CI is its first test (build only, `push: "false"`). ## Conventions - Secret is the global `REPO_WRITER_PAT`, passed in explicitly by callers. - No hardcoded hostname (registry from `github.server_url`). - Callers pin `@v1`. After merging I create tag `v1.0.0` and `v1`. Generated with [Claude Code](https://claude.com/claude-code)
feat: python-test, security-scan, docker-publish and auto-tag actions
Some checks failed
CI / python-test (pull_request) Successful in 14s
CI / security-scan (pull_request) Successful in 21s
CI / auto-tag (dry run) (pull_request) Successful in 3s
CI / docker-publish (build only) (pull_request) Failing after 3s
53dacb74f2
Four composite actions for the repositories on this Forgejo, with
fixtures the repo tests itself against, starters in templates/ and a
README with the conventions (REPO_WRITER_PAT, no hardcoded hostname,
tags drive releases).

Removes the resolution probes. Findings from them: the full URL form
https://<host>/tim/workflow-basics/<action>@ref and ./local resolve,
the short form tim/workflow-basics/<action>@ref does not.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(security-scan): audit the installed environment, not pyproject.toml
Some checks failed
CI / python-test (pull_request) Successful in 14s
CI / security-scan (pull_request) Successful in 29s
CI / auto-tag (dry run) (pull_request) Successful in 3s
CI / docker-publish (build only) (pull_request) Failing after 3s
6ecf88ac41
pip-audit . only reads PEP 621 dependencies, so a Poetry project (the
nissan-leaf library) or one with only optional groups audited nothing
and just printed a warning. Install the project into a venv and audit
that site-packages with --path instead: works for any build backend and
covers transitive dependencies. pip-audit stays in its own venv so it
is not audited itself. Adds an audit-extras input.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ci: one self-test workflow per action
Some checks failed
test auto-tag / test (pull_request) Successful in 3s
test docker-publish / test (pull_request) Failing after 3s
test python-test / test (pull_request) Successful in 14s
test security-scan / test (pull_request) Successful in 30s
eecb929903
A single workflow with four jobs reports one status, so a failure did
not say which action broke. One workflow per action does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(docker-publish): always pass exactly one output flag
All checks were successful
test auto-tag / test (pull_request) Successful in 3s
test docker-publish / test (pull_request) Successful in 3s
test python-test / test (pull_request) Successful in 14s
test security-scan / test (pull_request) Successful in 28s
536e894b30
With push=false the build ran with an empty output array expanded under
set -u (unbound variable on bash < 4.4) and a multi-platform build that
cannot be loaded. Build the first platform with --load when not
pushing, and --push with all platforms otherwise.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix(auto-tag): do not read a git error as "tag missing"
All checks were successful
test auto-tag / test (pull_request) Successful in 3s
test docker-publish / test (pull_request) Successful in 3s
test python-test / test (pull_request) Successful in 14s
test security-scan / test (pull_request) Successful in 28s
e13a06fb2d
git ls-remote --exit-code returns 2 for "no such tag" and other codes
for errors such as an unreachable remote. The old check lumped them
together, so a network blip would attempt to create an existing tag and
fail confusingly. Only exit code 2 means the tag is missing; anything
else fails with a clear error.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
feat(docker-publish): provenance and SBOM attestations on release tags
All checks were successful
test auto-tag / test (pull_request) Successful in 3s
test docker-publish / test (pull_request) Successful in 4s
test python-test / test (pull_request) Successful in 14s
test security-scan / test (pull_request) Successful in 28s
57210190a8
hass-mcp already published both on tag builds; make it the default for
every image published from a tag. Branch builds skip them to stay fast.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tim merged commit e6ff85d7f0 into main 2026-10-12 09:28:38 +00:00
tim deleted branch feat/initial-actions 2026-10-12 09:28:38 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
tim/workflow-basics!1
No description provided.