26 lines
1.2 KiB
YAML
26 lines
1.2 KiB
YAML
# Canonical Woodpecker clone step (oleks/ci-scripts#3).
|
|
#
|
|
# Copy this `clone:` block verbatim into any pipeline that needs an explicit
|
|
# clone override (private repo over HTTPS via a Gitea PAT, shallow clone, or
|
|
# tags disabled). Most simple pipelines don't need this at all — Woodpecker's
|
|
# built-in implicit clone already authenticates the same way when the repo is
|
|
# private and the server has forge credentials wired up. Reach for this block
|
|
# when you need to tune PLUGIN_TAGS/PLUGIN_DEPTH or you're on a runner that
|
|
# doesn't have implicit forge auth (e.g. a Kubernetes backend crossing
|
|
# namespaces).
|
|
#
|
|
# Required secret: `gitea_clone_token` — a Gitea PAT with repo read scope,
|
|
# set as an org secret so every repo can reference it without redefining it
|
|
# (see docs/constants.md, oleks/ci-scripts#4).
|
|
|
|
clone:
|
|
- name: clone
|
|
image: woodpeckerci/plugin-git
|
|
environment:
|
|
CI_NETRC_MACHINE: git.oleks.space
|
|
CI_NETRC_USERNAME: oleks
|
|
CI_NETRC_PASSWORD:
|
|
from_secret: gitea_clone_token
|
|
PLUGIN_TAGS: "false" # set "true" if the build needs tag history (e.g. nix-shell git describe)
|
|
PLUGIN_DEPTH: "1" # shallow clone; drop this key entirely for full history
|