Files
ci/checkout/action.yml
T
ozan d61246e7e4 docs: add provenance comments — what was replaced, why, what was removed
Each action.yml now documents:
- Original upstream repo (GitHub Actions)
- Why it was rewritten for self-hosted Gitea
- What was removed from the original
- Author and date
2026-05-22 17:55:30 +01:00

61 lines
1.9 KiB
YAML

# Tinqs Checkout — replaces actions/checkout@v4
# Original: https://github.com/actions/checkout (GitHub-hosted, Node.js action)
# Why rewritten: actions/checkout requires Node.js runtime and GitHub API calls.
# On self-hosted Gitea (tinqs.com), it fails because it tries to hit api.github.com.
# This composite action uses plain git clone — works on any runner with git installed.
# Removed from original: submodules, LFS, sparse-checkout, GitHub token auth, persist-credentials.
# We only need depth, ref, and optional Gitea token for private repos.
# Author: Ozan / Claude Code — 2026-05-22
# Part of: tinqs/ci (Tinqs CI toolchain)
name: 'Tinqs Checkout'
description: 'Clone a Gitea repository (replaces actions/checkout)'
inputs:
repository:
description: 'Repository (owner/repo)'
default: '${{ github.repository }}'
ref:
description: 'Branch or tag to checkout'
default: '${{ github.ref_name }}'
depth:
description: 'Clone depth (0 = full)'
default: '1'
path:
description: 'Directory to clone into'
default: '.'
token:
description: 'Gitea access token (for private repos)'
default: ''
runs:
using: 'composite'
steps:
- run: |
REPO="${{ inputs.repository }}"
REF="${{ inputs.ref }}"
DEPTH="${{ inputs.depth }}"
TARGET="${{ inputs.path }}"
TOKEN="${{ inputs.token }}"
if [ "$DEPTH" = "0" ]; then
DEPTH_FLAG=""
else
DEPTH_FLAG="--depth $DEPTH"
fi
if [ -n "$TOKEN" ]; then
URL="https://token:${TOKEN}@tinqs.com/${REPO}.git"
else
URL="https://tinqs.com/${REPO}.git"
fi
if [ "$TARGET" = "." ]; then
git clone $DEPTH_FLAG --branch "$REF" "$URL" .
else
git clone $DEPTH_FLAG --branch "$REF" "$URL" "$TARGET"
fi
echo "Checked out ${REPO}@${REF}"
shell: bash