make action pr auth failures explicit

This commit is contained in:
2026-03-09 17:35:18 +00:00
parent 1dfe28047c
commit 0f5f6f3694
3 changed files with 21 additions and 6 deletions
+6 -1
View File
@@ -86,7 +86,7 @@ jobs:
- name: open pull request
if: steps.update.outputs.updated == 'true'
env:
GITEA_TOKEN: ${{ secrets.tea_token }}
GITEA_TOKEN: ${{ secrets.tea_token || secrets.TEA_TOKEN }}
shell: bash
run: |
set -euo pipefail
@@ -94,6 +94,11 @@ jobs:
api="https://gitea.unrail.xyz/api/v1/repos/thomas/nixos-config"
branch="bot/helium-${{ steps.update.outputs.version }}"
if [ -z "${GITEA_TOKEN:-}" ]; then
echo "GITEA_TOKEN is empty (check repo secret tea_token/TEA_TOKEN)"
exit 1
fi
# Skip if PR for this branch already exists
existing=$(curl -fsS \
-H "Authorization: token ${GITEA_TOKEN}" \