ci: map the Gitea token into the release step explicitly
Woodpecker does not auto-inject repo secrets into steps; map GITEA_TOKEN with environment.from_secret so tools/release/publish-gitea.py can create the prerelease and upload assets. The lane still fails closed with an actionable message when the secret is absent.
This commit is contained in:
1 parent
22c3d92b47
commit
6fbbaea7ce
1 file changed
+4
-1
@@ -47,6 +47,9 @@ steps:
|
||||
when:
|
||||
event: [tag]
|
||||
image: rust:1.100-bookworm
|
||||
environment:
|
||||
GITEA_TOKEN:
|
||||
from_secret: GITEA_TOKEN
|
||||
commands:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends ca-certificates git build-essential python3
|
||||
@@ -64,7 +67,7 @@ steps:
|
||||
python3 tools/release/package.py --source-sha "$CI_COMMIT_SHA" --version "$version"
|
||||
python3 tools/release/smoke.py --archive "dist/marqdo-knowledge-$version-x86_64-unknown-linux-gnu.tar.gz" --evidence-out dist/smoke-evidence.json
|
||||
if [ -z "${GITEA_TOKEN:-}" ]; then
|
||||
echo "GITEA_TOKEN secret is required for the release lane" >&2
|
||||
echo "GITEA_TOKEN secret is required for the release lane; map it via the step environment from_secret entry" >&2
|
||||
exit 2
|
||||
fi
|
||||
python3 tools/release/publish-gitea.py \
|
||||
|
||||
Reference in new issue
Block a user