Default community health files for repositories owned by
@qte77. Files here are inherited by any
qte77/* repository that does not define its own.
| File | Purpose |
|---|---|
CODE_OF_CONDUCT.md |
Conduct rules across all qte77 projects |
CONTRIBUTING.md |
How to contribute |
GOVERNANCE.md |
Decision-making and maintainer roles |
SECURITY.md |
Vulnerability reporting |
SUPPORT.md |
Where to ask questions |
.github/DISCUSSION_TEMPLATE/*.yml |
Discussion category forms (ideas, q-and-a, show-and-tell) |
.github/ISSUE_TEMPLATE/*.yml |
Bug report, feature request, chooser config |
.github/PULL_REQUEST_TEMPLATE.md |
PR description template |
The cascade applies to GitHub-rendered surfaces only (Security tab, issue chooser, profile sidebar). Files do not materialize in consuming repos, so filesystem references like [security](SECURITY.md), [ -f SECURITY.md ], or cat CONTRIBUTING.md still 404. For cross-doc links use:
https://github.com/qte77/<repo>/security/policy(renders cascaded content)https://github.com/qte77/.github/blob/main/<file>(canonical source)
Cascaded PR, issue, and discussion templates auto-populate only in the web UI. gh and the REST API read templates from the local repo and won't pull these owner-level defaults, so scripted PR/issue creation must use the web UI or fetch the template explicitly.
These must live in each repo individually — copy from here when bootstrapping a new repo.
| File | Purpose |
|---|---|
LICENSE |
Canonical Apache-2.0 text |
NOTICE |
Attribution template with {PROJECT_NAME} and {YEAR} placeholders |
Workflows downstream qte77/* repos can call directly. Configs (.markdownlint.jsonc, lychee.toml) are picked up from the caller's repo if present, otherwise fetched from this repo's main branch as fallback.
| Workflow | Purpose |
|---|---|
.github/workflows/lint-md-links.yml |
Markdown + link checking (markdownlint-cli2 + lychee) |
.github/workflows/lint-actions.yml |
Workflow lint + security scan (actionlint + yamllint + zizmor) |
.github/workflows/ci-python.yml |
Lint (ruff) + test (pytest) a uv project against its committed uv.lock |
.github/workflows/bump-version.yml |
Version bump → signed commit → PR (via bump-my-version) |
.github/workflows/tag-release.yml |
Detect version bump in a file, create annotated git tag |
.github/workflows/publish-release.yml |
Create GitHub Release from a changelog block |
.github/workflows/svg-render.yml |
Render SVGs to PNGs (cairosvg) and upload as a build artifact |
Caller usage:
jobs:
lint:
uses: qte77/.github/.github/workflows/lint-md-links.yml@mainMarkdown is linted recursively (**/*.{md,markdown}). Narrow or extend it with the globs input (newline-separated, # prefix excludes):
jobs:
lint:
uses: qte77/.github/.github/workflows/lint-md-links.yml@main
with:
globs: |
**/*.md
#node_modulesThe actions inside the workflow are SHA-pinned. The workflow's runtime config fetch (.markdownlint.jsonc, lychee.toml) tracks main, so lint rule updates propagate to all callers automatically. Override locally by committing a markdownlint config (any filename markdownlint-cli2 discovers: .markdownlint-cli2.{jsonc,yaml,cjs,mjs} or .markdownlint.{jsonc,json,yaml,yml,cjs,mjs}) or a lychee.toml at the caller repo root.
For stricter reproducibility, callers can pin the uses: ref to a SHA instead of @main (this is what qte77/* repos do internally — not a requirement for external callers):
uses: qte77/.github/.github/workflows/lint-md-links.yml@<SHA> # bump on .github updatesThe reusable workflow accepts a notify_on_failure input. Use a single caller file that handles PR-blocking and cron monitoring together — notify_on_failure derives from the trigger so an issue is only created on scheduled failures, never on PR failures. Repeated failures comment on the one open report+automated issue for that ref instead of opening a new one, and the next green scheduled run closes it:
name: Lint MD and Links
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * 0" # weekly Sunday 00:00 UTC
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
lint:
uses: qte77/.github/.github/workflows/lint-md-links.yml@<SHA>
with:
notify_on_failure: ${{ github.event_name == 'schedule' }}
permissions:
contents: read
issues: writeOne caller file, one job — never two files. The schedule: trigger must live in the caller because reusable workflows cannot propagate schedule: to callers (see GitHub docs).
Schedule runs only check links — the markdown job is skipped on schedule events because markdown content is stable post-merge; only links rot independently. PR/push runs check both.
Repos that don't need cron monitoring can omit the schedule: trigger and drop the with: notify_on_failure: line. The issues: write permission must still be granted, however — the reusable's notify job declares it unconditionally, and GitHub Actions validates all reusable-job permissions at workflow startup, before if: conditions are evaluated. Omitting it yields startup_failure on every run, even when notify_on_failure is false and the notify job is correctly skipped at runtime.
Minimal caller (no cron, no notify):
name: Lint MD and Links
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
issues: write # required at workflow startup even when not opting into notify
jobs:
lint:
uses: qte77/.github/.github/workflows/lint-md-links.yml@<SHA>The bump-version.yml reusable workflow runs bump-my-version on the caller's project, makes a signed commit via the GitHub API, pushes a bump branch, and opens a PR. It does not create tags or releases — pair it with tag-release.yml (fires on merge to main) and optionally publish-release.yml (manual dispatch) for the full bump→tag→release pipeline.
The run fails before touching the bump branch when the base branch moved after the run's checkout, and an open bump PR is left untouched. A re-run keeps its original commit, so re-running an old run fails this way too. Dispatch a new run instead (#79).
name: Bump Version
on:
workflow_dispatch:
inputs:
bump_type:
description: "[major|minor|patch]"
required: true
type: choice
options: [patch, minor, major]
permissions:
contents: write
pull-requests: write
jobs:
bump:
uses: qte77/.github/.github/workflows/bump-version.yml@<SHA>
with:
bump_type: ${{ inputs.bump_type }}
permissions:
contents: write
pull-requests: writeConsumer-repo prerequisites:
- Settings → Actions → General → Workflow permissions → "Allow GitHub Actions to create and approve pull requests" must be enabled, otherwise
gh pr createreturns403 not authorized. - A bumpversion source must be present in the caller repo. Typical setup is
pyproject.tomlwith a[tool.bumpversion]table containingcurrent_versionand any[[tool.bumpversion.files]]entries.
Inputs (all optional except bump_type):
| Input | Default | Notes |
|---|---|---|
bump_type |
— | patch / minor / major |
python_version |
"3.13" |
Passed to actions/setup-python |
bump_my_version_pin |
"1.3.0" |
Pip version spec |
branch_prefix |
"bump" |
Branch is <prefix>-<run_number>-<ref_name> |
pr_title_template |
"chore(release): bump {previous} → {current}" |
{previous} / {current} substituted at runtime |
open_pr |
"true" |
Set to "false" to push the branch but skip PR creation |
use_uv |
false |
Use uv run bump-my-version instead of pip (requires uv-managed project) |
sync_lockfile |
false |
Run uv lock after bump to keep uv.lock in sync |
collect_scriv |
false |
Run scriv collect to fold changelog.d/ fragments before the signed commit |
scriv_pin |
"" |
With collect_scriv: run scriv through uvx at this version instead of uv run scriv, for repos with no uv project |
config_file |
"" |
bump-my-version config path for monorepos (e.g. packages/core/pyproject.toml); commands still run from the repo root |
lockfile_dirs |
"." |
Space-separated directories to uv lock in when sync_lockfile is on |
app_client_id |
"" |
GitHub App client ID. With the app_private_key secret, the bump commit and PR use an App installation token, so the PR's pull_request CI runs (events made with GITHUB_TOKEN start no workflow runs). Unset keeps GITHUB_TOKEN |
Secrets (optional): app_private_key, the private key of the App named by app_client_id. The App needs contents and pull-requests write and must be installed on the caller repo. Pass both explicitly from the caller job:
with:
bump_type: ${{ inputs.bump_type }}
app_client_id: ${{ vars.RELEASE_APP_CLIENT_ID }}
secrets:
app_private_key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}The bump always runs with --no-commit --no-tag, whatever the caller's [tool.bumpversion] says: the signed commit is built from the working-tree diff, and tagging belongs to tag-release.yml.
Outputs: previous_version, current_version, branch, pr_url.
On failure or cancellation, the workflow closes the PR (if any) and deletes the bump branch. It never deletes tags or releases — GitHub's release-immutability setting remembers deleted tag names forever, so deleting on failure permanently burns the version number (see #23 for the incident that led to this rule).
tag-release.yml watches any version file for a bump, then creates an annotated ${tag_prefix}${version} tag against the merge commit. Pair it with bump-version.yml: bump-version uses --no-tag so the tag always lands on the squash-merge commit rather than the bump-branch commit.
Permissions required: contents: write (no secrets: inherit — uses default GITHUB_TOKEN).
Idempotency / never-delete: exits 0 when the version hasn't changed; exits 1 if the tag already exists. Tags are never deleted on any failure path (see #23).
Inputs:
| Input | Type | Default | Purpose |
|---|---|---|---|
version_file |
string | pyproject.toml |
File containing the version string |
tag_prefix |
string | v |
Prefix prepended to the version number |
version_regex |
string | ^version = "(.*)" |
Extended regex with one capture group for the version |
Outputs: tag, the tag this run created (empty when the version did not change). Chain publish-release.yml on it to publish the Release in the same run (example below); a separate on: push: tags workflow would not start, because the tag is pushed with GITHUB_TOKEN.
Minimal thin caller — put this in the consumer repo's .github/workflows/:
name: Tag Release
on:
push:
branches: [main]
paths: [pyproject.toml]
permissions:
contents: write
jobs:
tag:
uses: qte77/.github/.github/workflows/tag-release.yml@main
permissions:
contents: write
# Optional: publish the Release right after the tag.
publish:
needs: tag
if: needs.tag.outputs.tag != ''
uses: qte77/.github/.github/workflows/publish-release.yml@main
permissions:
contents: write
with:
tag: ${{ needs.tag.outputs.tag }}Pin @main to the release tag's commit (@<SHA> # vX.Y.Z) for stricter reproducibility (see Keeping caller SHA pins fresh).
publish-release.yml creates a GitHub Release for an existing tag, extracting notes from the ## [version] block of the changelog. Falls back to GitHub's auto-generated notes when the block is missing or empty. A trailing --- separator and blank lines are dropped first, so they never end up in the notes and an entry-less version still falls back. Use it as a manual-dispatch step after a tag has been created, or chain it on tag-release.yml's tag output (see above).
Permissions required: contents: write (no secrets: inherit — uses default GITHUB_TOKEN).
Idempotency / never-delete: exits 1 if a Release already exists for the resolved tag; never overwrites. See #23.
Inputs:
| Input | Type | Default | Purpose |
|---|---|---|---|
tag |
string | (latest ${tag_prefix}*) |
Tag to publish; leave blank to auto-resolve the latest matching tag |
changelog_path |
string | CHANGELOG.md |
Path to the changelog file |
tag_prefix |
string | v |
Tag prefix used when resolving "latest" |
Minimal thin caller:
name: Publish Release
on:
workflow_dispatch:
inputs:
tag:
description: "Tag to publish (leave blank for latest v* tag)"
required: false
type: string
permissions:
contents: write
jobs:
publish:
uses: qte77/.github/.github/workflows/publish-release.yml@main
with:
tag: ${{ inputs.tag }}
permissions:
contents: writeCallers pin uses: to a full commit SHA. The qte77/* repos use two pin forms:
| Workflows | Pin form | How the pin moves |
|---|---|---|
bump-version.yml, tag-release.yml, publish-release.yml, lint-actions.yml |
the release tag's commit: @<SHA> # vX.Y.Z |
Dependabot opens a bump PR when a newer release tag is cut, rewriting the SHA and the comment. Seen when v0.1.2 was cut: qte77/gha-rxiv-paper-eval#127 and qte77/gha-rxiv-feed-action#262 moved # v0.1.1 to # v0.1.2. |
lint-md-links.yml |
a main commit with a date comment: @<SHA> # main <date> |
Tracks main on purpose. Unverified: Dependabot bumps of these pins are mixed across the estate (some repos got a PR, many stayed on an April commit), so check the pin by hand after a lint change lands (#18). |
Both forms need Dependabot for GitHub Actions enabled in the caller repo (.github/dependabot.yml):
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"Each caller pulls updates on its own cadence. No central fan-out, no repository_dispatch, no scripted bumps.
References:
- Reusable workflows
- Workflow_call event semantics
- Keeping actions up to date with Dependabot
dependabot.ymlconfiguration
This repo releases itself with the same three workflows, through two thin callers:
- Run Bump Version (
.github/workflows/bump.yml,workflow_dispatch, inputbump_type:patch/minor/major). It opens a bump PR forpyproject.toml; this needs the repo setting "Allow GitHub Actions to create and approve pull requests". - Merge that PR. Release (
.github/workflows/release.yml, on push tomaintouchingpyproject.toml) tagsv<version>and publishes the GitHub Release in the same run.
There is no CHANGELOG.md here, so release notes are GitHub's generated notes. First release: v0.1.1 (2026-11-13).
These templates pair with the reusable lint workflow above. Copy into a downstream repo to override the fallback fetched from main.
| File | Purpose |
|---|---|
.markdownlint.jsonc |
Markdown style rules (MD013 disabled, MD060 padded tables, frontmatter-aware MD041) |
lychee.toml |
Link checker config (accept common bot-blocking codes) |
Install markdownlint-cli2 to match CI behavior (the action uses cli2). The older markdownlint CLI does not honor .markdownlint-cli2.jsonc ignore files, which causes local-vs-CI discrepancies.
npm install -g markdownlint-cli2
markdownlint-cli2 '**/*.md'- Default community health files: https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file
- Licensing a repository: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository
- User profile README: https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme