-
Select Topic AreaQuestion BodyWhat permissions does one need to give to allow a github action token to access the models API? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Hi @pelikhan , Models are designed to support tokens that are tied to individual user contexts, meaning that they can perform actions based on the permissions and access rights of that individual user. In contrast, GitHub Actions generally use tokens that are scoped to the repository or organization level rather than individual users. Technically, you could pass an individual's Personal Access Token (PAT) into a GitHub Action to execute workflows with the permissions of that user. However, this practice is not recommended. It is generally safer to use GitHub-provided tokens or other methods that maintain proper security boundaries and auditability. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for your patience on this topic. Based on feedback from users like yourself, we've made progress on integrating GitHub Models with GitHub Actions in a secure and straightforward way. Current Status (April 2025)We now support the How to Use Models in GitHub ActionsYou can now include the name: AI-powered CI
on: [ push ]
permissions:
models: read # grants inference access
contents: read # typical default for code checks
jobs:
run-inference:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate summary via Models API
run: |
response=$(gh api \
POST /models/infer \
-f model_id="gpt-4-turbo" \
-f input="Summarize the latest release notes.")
echo "$response"Available Permissions
For detailed information, please visit: permissions documentation
We appreciate your suggestion which helped prioritize this feature. We hope this implementation addresses your use case, and welcome any feedback on this new functionality. |
Beta Was this translation helpful? Give feedback.
Thank you for your patience on this topic. Based on feedback from users like yourself, we've made progress on integrating GitHub Models with GitHub Actions in a secure and straightforward way.
Current Status (April 2025)
We now support the
modelspermission scope in GitHub Actions workflows. This allows you to access the Models API using the GitHub-generatedGITHUB_TOKENwithout requiring personal access tokens.How to Use Models in GitHub Actions
You can now include the
models: readpermission in your workflow file: