GitHub Actions Integration with Core App¶
This guide explains how to integrate your GitHub Core App with GitHub Actions workflows for organization-level automation.
What You'll Learn
Generate short-lived tokens, use them with GitHub CLI and APIs, implement common workflow patterns, and handle errors gracefully.
Prerequisites¶
Before integrating, ensure you have:
- Core App created and installed - See GitHub App Setup
- Secrets configured -
CORE_APP_IDandCORE_APP_PRIVATE_KEYstored in GitHub - Required permissions - App has permissions for your automation tasks
Authentication Methods¶
GitHub Apps support three authentication methods, each serving different use cases:
| Method | Scope | Expiration | Primary Use Case |
|---|---|---|---|
| JWT | App-level | 10 minutes | Installation discovery, app metadata, bootstrapping |
| Installation Tokens | Repository/Org | 1 hour | Repository operations, API access, automation |
| OAuth | User context | Configurable | User-specific operations, web flows |
Which authentication method should I use?
- Most workflows โ Installation Tokens (via
actions/create-github-app-token) - App management โ JWT (list installations, app configuration)
- User operations โ OAuth (actions on behalf of a user)
See the Authentication Decision Guide for detailed selection criteria.
What's Covered¶
This section walks through the complete integration lifecycle:
Authentication Methods:
- JWT Authentication - App-level authentication for installation discovery and management
- Installation Tokens - Generate short-lived tokens from Core App credentials
- OAuth Authentication - User-context authentication for web and device flows
- Token Lifecycle - Token expiration, refresh strategies, and caching patterns
Integration Patterns:
- Using Tokens - Integrate tokens with GitHub CLI, Git, and APIs
- Workflow Patterns - Common automation patterns
- Token Validation - Verify token scope and permissions
- Workflow Permissions - Configure workflow-level permissions
Operations:
- Error Handling - Handle authentication errors and token expiration
- Security Best Practices - Keep tokens secure
- Troubleshooting - Debug common issues
- Performance Optimization - Optimize for speed
References¶
- actions/create-github-app-token
- GitHub Actions Permissions
- GitHub CLI Manual
- GitHub GraphQL API
- GitHub Core App Setup