feat(gitea): replace GITEA_TOKEN with JEEVES_BOT_TOKEN in workflows and script
treefmt / nix fmt (push) Successful in 5s
pytest / pytest (push) Successful in 32s
build_systems / build-brain (push) Successful in 36s
build_systems / build-rhapsody-in-green (push) Successful in 47s
build_systems / build-jeeves (push) Successful in 1m59s
test ebook search / test-ebook-search (push) Successful in 31s
build_systems / build-bob (push) Successful in 36s
test ebook search / test-ebook-search (pull_request) Successful in 35s
treefmt / nix fmt (pull_request) Successful in 6s
pytest / pytest (pull_request) Successful in 30s
build_systems / build-brain (pull_request) Successful in 47s
build_systems / build-bob (pull_request) Successful in 49s
build_systems / build-rhapsody-in-green (pull_request) Successful in 1m0s
build_systems / build-jeeves (pull_request) Successful in 2m15s

This commit was merged in pull request #65.
This commit is contained in:
2026-08-29 09:38:36 -04:00
parent bdf67e96f0
commit 2882960a8e
3 changed files with 7 additions and 7 deletions
@@ -19,5 +19,5 @@ jobs:
python -m python.gitea_flake_lock merge python -m python.gitea_flake_lock merge
--repo "${{ github.repository }}" --repo "${{ github.repository }}"
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
GITEA_URL: https://gitea.tmmworkshop.com GITEA_URL: https://gitea.tmmworkshop.com
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
run: nix flake update run: nix flake update
- name: Create or update flake.lock PR - name: Create or update flake.lock PR
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} JEEVES_BOT_TOKEN: ${{ secrets.JEEVES_BOT_TOKEN }}
GITEA_URL: https://gitea.tmmworkshop.com GITEA_URL: https://gitea.tmmworkshop.com
run: >- run: >-
nix develop .#devShells.x86_64-linux.default -c nix develop .#devShells.x86_64-linux.default -c
+5 -5
View File
@@ -84,13 +84,13 @@ def push_branch(*, branch: str) -> None:
run_cmd(["git", "push", "origin", f"HEAD:{branch}", "--force"]) run_cmd(["git", "push", "origin", f"HEAD:{branch}", "--force"])
def _required_gitea_token() -> str: def _required_jeeves_bot_token() -> str:
"""Read the required Gitea token from the environment.""" """Read the required Gitea token from the environment."""
token = getenv("GITEA_TOKEN") token = getenv("JEEVES_BOT_TOKEN")
if token: if token:
return token return token
msg = "GITEA_TOKEN environment variable is required" msg = "JEEVES_BOT_TOKEN environment variable is required"
raise RuntimeError(msg) raise RuntimeError(msg)
@@ -111,7 +111,7 @@ def update(
owner, repo_name = split_repo_name(repo) owner, repo_name = split_repo_name(repo)
with GiteaClient( with GiteaClient(
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL), base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
token=_required_gitea_token(), token=_required_jeeves_bot_token(),
) as client: ) as client:
pull_request = ensure_flake_lock_pull_request( pull_request = ensure_flake_lock_pull_request(
client, client,
@@ -134,7 +134,7 @@ def merge(
owner, repo_name = split_repo_name(repo) owner, repo_name = split_repo_name(repo)
with GiteaClient( with GiteaClient(
base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL), base_url=getenv("GITEA_URL", DEFAULT_GITEA_URL),
token=_required_gitea_token(), token=_required_jeeves_bot_token(),
) as client: ) as client:
pull_request = find_flake_lock_pull_request(client, owner=owner, repo=repo_name) pull_request = find_flake_lock_pull_request(client, owner=owner, repo=repo_name)
if not pull_request: if not pull_request: