Rename GITEA_TOKEN secret to STATE_PUSH_TOKEN
Gitea rejects secret names starting with the reserved GITEA_ prefix.
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
# Commit state.json back to this repo so the next scheduled run knows what was
|
||||
# already built. Without this the daily check would rebuild every night.
|
||||
#
|
||||
# GITEA_TOKEN token with write access to this repo (required)
|
||||
# STATE_PUSH_TOKEN token with write access to this repo (required)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
: "${GITEA_TOKEN:?GITEA_TOKEN is required}"
|
||||
: "${STATE_PUSH_TOKEN:?STATE_PUSH_TOKEN is required}"
|
||||
|
||||
python3 - <<'PY'
|
||||
import json
|
||||
@@ -40,6 +40,6 @@ git commit -m "Record build of ${GITHUB_REF_NAME:-build}: $(python3 -c 'import j
|
||||
origin="$(git remote get-url origin)"
|
||||
host_path="${origin#*://}"
|
||||
host_path="${host_path#*@}"
|
||||
git push "https://x-access-token:${GITEA_TOKEN}@${host_path}" HEAD:"${GITHUB_REF_NAME:-master}"
|
||||
git push "https://x-access-token:${STATE_PUSH_TOKEN}@${host_path}" HEAD:"${GITHUB_REF_NAME:-master}"
|
||||
|
||||
echo ":: state recorded"
|
||||
|
||||
Reference in New Issue
Block a user