Skip to content

duaneadam/glm-code-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

glm-code-action

Use this workflow to run Claude Code GitHub Actions with Z.ai GLM models.

This setup is intended for the GLM coding plan rather than a normal usage-based API setup. The practical reason is cost control: the coding plan gives fixed pricing with a defined quota, which can be easier to reason about than per-token API billing.

If you want to try the GLM coding plan, you can use this referral link: https://z.ai/subscribe?ic=1NYDIDBPNE

What This Repo Does

The workflow in .github/workflows/glm.yml listens for @claude mentions on:

  • issue comments
  • pull request review comments
  • pull request reviews
  • issues

When a matching event arrives, GitHub Actions runs Claude Code with these Z.ai-backed model settings:

  • ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic
  • ANTHROPIC_DEFAULT_OPUS_MODEL=glm-5.1
  • ANTHROPIC_DEFAULT_SONNET_MODEL=glm-5-turbo

Quickstart

  1. Copy .github/workflows/glm.yml into your GitHub repository.
  2. Open your GitHub repository settings.
  3. Go to Settings -> Secrets and variables -> Actions.
  4. Add a new repository secret named ZAI_API_KEY.
  5. Paste your Z.ai API key as the secret value.
  6. In the workflow file, keep ANTHROPIC_BASE_URL set to https://api.z.ai/api/anthropic.
  7. Commit the workflow file to your repository.
  8. Trigger the workflow by mentioning @claude in an issue or supported review event.

The screenshot below shows the correct GitHub page for adding ZAI_API_KEY. The Z.ai URL belongs in the workflow file, not in GitHub Secrets:

GitHub Actions secret setup for ZAI_API_KEY

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors