Reusable GitHub Actions workflows and composite actions for kioteam-ir.
Pin callers to a tag (@v1), not main.
| Path | Kind | Use when |
|---|---|---|
.github/workflows/*.yml |
reusable workflow (workflow_call) |
The shared unit is a whole job (runner, secrets, several steps) |
actions/*/action.yml |
composite action | The shared unit is a step inside a job the caller owns |
A reusable workflow that lives in this repo must reference composite actions with the full path kioteam-ir/kio-github-actions/actions/<name>@<tag>. Relative ./ paths resolve against the caller repo, not this one.
- Repo → Settings → Actions → General → Access: Accessible from repositories in the
kioteam-irorganization. - Put
TELEGRAM_TO(supergroup chat id) andTELEGRAM_TOKENon the caller repo, or as org secrets.telegram-notifysends to forum topic8643unlessmessage_thread_idis overridden.
This repo is public so public callers such as kio-website can use it. Do not put secrets in YAML.
This repo also calls notify-events.yml@v1 from .github/workflows/notify.yml so its own pushes, issues, PRs, and releases notify Telegram. Set TELEGRAM_TO and TELEGRAM_TOKEN as repository secrets (same names as the product repos).
Caller keeps the on: triggers. This repo owns the Telegram job.
name: Notify Repo Events
on:
push:
issues:
types: [opened, closed, reopened]
issue_comment:
types: [created]
pull_request:
types: [opened, closed, reopened]
pull_request_review_comment:
types: [created]
release:
types: [published]
jobs:
notify:
uses: kioteam-ir/kio-github-actions/.github/workflows/notify-events.yml@v1
secrets:
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}Optional input runner defaults to ubuntu-latest. Self-hosted callers pass with: { runner: self-hosted }.
Caller keeps on.workflow_run (which workflows to watch). This repo owns success/failure Telegram jobs.
name: Notify CI Result
on:
workflow_run:
workflows: [CI, Deploy]
types: [completed]
jobs:
notify:
uses: kioteam-ir/kio-github-actions/.github/workflows/notify-ci.yml@v1
secrets:
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}jobs:
example:
runs-on: ubuntu-latest
steps:
- uses: kioteam-ir/kio-github-actions/actions/telegram-notify@v1
with:
token: ${{ secrets.TELEGRAM_TOKEN }}
to: ${{ secrets.TELEGRAM_TO }}
message: hello from ${{ github.repository }}Use GitHub-hosted runners through reusable workflows:
name: CI
on:
push:
pull_request:
jobs:
python:
uses: kioteam-ir/kio-github-actions/.github/workflows/python-poetry-ci.yml@v1jobs:
fullstack:
uses: kioteam-ir/kio-github-actions/.github/workflows/fullstack-ci.yml@v1The full-stack workflow expects backend/requirements.txt and
frontend/package-lock.json. Override the workflow inputs when a project
uses different directories or commands.
- Merge to
main. - Tag a release (
v1.0.1) and move the floating major tag (v1) to the same commit. - Callers stay on
@v1until a breaking change needs@v2.