GitHub App integration overview
On This Page
- Steps to integrate GitHub projects with CircleCI
- Can I integrate a GitHub org with multiple CircleCI orgs?
- Trigger a pipeline in CircleCI
- Project settings
- People
- Pipelines and triggers
- Advanced
- Organization settings
- People
- Roles and permissions
- Deprecated system environment variables
- Moving from the GitHub OAuth app integration to the GitHub App integration
- Currently not supported
- Manual trigger pipeline option
- Restrict a context to a security group
- In-app config editor
- Account integrations
- Scheduled pipelines
- Build forked pull requests
- Passing secrets to forked pull requests
- Stop building
- Additional SSH keys only
- Test Insights
- Only build pull requests
- Next steps
GitHub authorization with CircleCI is changing. Starting August 2023 when you authorize your CircleCI account with GitHub, you may find this will be done through our GitHub App, rather than the GitHub OAuth app. You can see which account type you have by heading to the CircleCI web app, select Dashboard from the sidebar, and inspect the URL in your browser:
For more information about the differences, see the GitHub docs comparison page. |
If your CircleCI organization is authenticated with GitHub through the GitHub App, the content on this page is for you.
This page walks you through integrating a GitHub project with CircleCI. The sections below introduce you to concepts and ways to manage CI/CD (continuous integration and continuous delivery) pipelines for your GitHub project. CircleCI features that are in development for GitHub App projects are detailed in the Currently not supported section.
The following limits are currently in place for GitHub App integrations:
-
Each user can create up to three organizations.
-
Each organization under a Free Plan can have up to 10 projects.
If you need more organizations or projects, consider upgrading to a Paid plan, or contact our Support team. If you need to delete an organization, contact our Support team.
Steps to integrate GitHub projects with CircleCI
Follow the steps on the Sign up and try CircleCI page to connect your GitHub account, which creates your CircleCI organization.
When you create a new organization, you will be guided to start creating projects, as follows:
-
The first project you create will prompt you to install the CircleCI GitHub App in a GitHub organization.
If your GitHub organization has more than 100 repositories, select the "Only select repositories" option when installing the GitHub App. There is a known issue where GitHub organizations with more than 100 repositories cannot view their repositories in CircleCI if they select the "All repositories" option when installing the CircleCI GitHub App. -
After installing the GitHub App, you will select a repository to use for your project’s first pipeline.
-
CircleCI will automatically generate a custom configuration file based on the programming languages and frameworks detected in your repository for this pipeline. If you already have a YAML configuration file on the default branch of the repository that you selected, CircleCI will use the configuration file that exists in the repository instead of generating a new one for your project’s first pipeline.
-
If CircleCI generated a custom configuration file for you, CircleCI will commit the generated configuration to a new branch (
circleci-project-setup
).
If you are new to CircleCI, you may wish to get started with our Quickstart guide, our Hello world examples, or take a look at some of our sample configurations that demonstrate different types of workflows. The Configuration reference is a full reference to the keys used in a .circleci/config.yml file. |
Can I integrate a GitHub org with multiple CircleCI orgs?
A GitHub org with the CircleCI GitHub App installed can only be integrated with one CircleCI organization.
If you attempt to integrate a GitHub org with the CircleCI GitHub App installed with a second CircleCI organization, you will find yourself on a GitHub App integration settings page when attempting to create a project.
![Create a project](/docs/assets/img/docs/github-app-configuration-page.png)
Trigger a pipeline in CircleCI
When you choose Commit and Run, as described above, a pipeline is triggered. You will see the pipeline running when you are taken to the CircleCI dashboard.
If you choose to review the configuration file in the config editor first, the pipeline is triggered after you save the .circleci/config.yml
by clicking the Commit and Run button.
Each time you push changes to your GitHub repository, a new pipeline is triggered. You will see the pipeline running in the CircleCI web app.
![Successful pipeline run](/docs/assets/img/docs/gl-ga/gitlab-ga-successful-pipeline.png)
Editing an existing CircleCI configuration within the web app is not currently available. All further changes to the configuration should be made in your GitHub repository. Committing further changes in your repository will automatically trigger a pipeline. Manually triggering a pipeline from the CircleCI web app is not available at this time. |
Project settings
Within CircleCI, a project can have one or more configurations, which are pipeline definitions. Configurations include, but are not limited to, a .circleci/config.yml
file in your repository.
A project can have one or more triggers, which are events from a source of change. Triggers include, but are not limited to, a Version Control System (VCS). A trigger determines which configuration should be used to start a pipeline.
The following settings are found by clicking the Project Settings button within your project. At this time, both configurations and triggers are limited to GitLab and GitHub App integrations.
People
Project roles give control over which users have access to which projects within an organization. This enables teams to have limited access to only their projects, while managers and others can have broader organizational access. The access options are:
-
Admin: Read and write access to the project and all settings and ability to manage other users' access.
-
Contributor: Read and write access to the project and some settings.
-
Viewer: Read only access to the project and some settings.
For a complete list of permissions, see the Roles and permissions overview page.
Pipelines and triggers
You can add or delete pipelines and triggers for your project. For details see the pipelines overview.
Advanced
-
You can enable dynamic configuration using setup workflows in CircleCI. To learn about dynamic configuration, read the Dynamic configuration guide.
Organization settings
For GitHub App integrations, organizations and users are managed independently from your VCS. Organizations and users are considered CircleCI organizations and users, with their own roles and permissions that do not rely on those defined in your VCS.
To manage settings at the organization level, select Organization Settings in the CircleCI web app sidebar.
People
Add or remove users, and manage user roles for the organization as well as user invites. See the Roles and permissions overview page for full details.
Roles and permissions
CircleCI users have different abilities depending on assigned roles in a particular organization. For a detailed list of CircleCI org and project roles and associated permissions, see the Roles and permissions page.
Deprecated system environment variables
A subset of built-in environment variables are not available in GitHub-based projects authorized through the GitHub App. VCS support for each environment variable is indicated in the Built-in environment variables table on the Project values and variables page. If your pipelines need these environment variables, we recommend you use suitable replacements from the available pipeline values.
Moving from the GitHub OAuth app integration to the GitHub App integration
CircleCI’s GitHub App integration provides fine-grained permissions, uses short-lived tokens, and gives you more control over which repositories CircleCI has access to. The CircleCI GitHub App also enables the following functions:
You can not currently automate migrating your organization from the GitHub OAuth app to CircleCI’s GitHub App integration.
Before attempting to move your information from an org integrated with the GitHub OAuth app to an org integrated with CircleCI’s GitHub App:
-
Confirm that you do not immediately need any of the functionality listed in the Currently not supported section below.
-
If you have a dedicated account team at CircleCI, contact them first to discuss your migration.
If you cannot move your organization because of missing functionality, tell us why.
If you would like to switch from the OAuth app integration to the GitHub App integration, follow these steps:
The following steps include creating a new org. If you need to transfer private orbs or self-hosted runner resource classes to your new org, contact Support at CircleCI before following step 14. |
-
From your existing CircleCI organization in the CircleCI web app, select the organization dropdown in the top-left corner.
-
At the bottom of the drop-down, select Create New Organization.
-
On the "Connect your code" page, select Connect next to "GitHub".
-
You will be redirected to GitHub to install the CircleCI GitHub App into your GitHub organization.
You can install the CircleCI GitHub App into the same GitHub organization that already uses the GitHub OAuth App integration. -
Follow the instructions to create a project that is connected to one of your GitHub repositories.
-
If you are on a paid pricing plan:
-
Navigate back to the organization that is connected to the GitHub OAuth app
-
Select Plan in the CircleCI web app
-
Select the "Share and Transfer" tab
-
Select Add shared organization and choose the new organization that you just created that integrates with CircleCI’s GitHub App.
-
-
Navigate to the project that was created in step 4 in the "new" organization that is integrated with the GitHub App. Match any custom project settings that you had from your previous project to this new project on the Project Settings page. This includes things like environment variables and outbound webhooks.
-
Perform a test push of code to your repository to ensure that a pipeline is triggered and is working as expected in your new CircleCI organization.
-
Assuming the repository you connected is also connected to your previous CircleCI organization, CircleCI will start pipelines when a push event happens to the repository in both the old and new organizations. If your test from step 8 above was successful, go to Project Settings in your organization connected to the GitHub OAuth App (your "old" org), scroll down and select Stop Building. This will ensure that push events to your repository only trigger pipelines in the project connected to your GitHub App organization.
-
Repeat steps 6-9 by selecting
for each project that you had set up in your previous organization. -
If you are using contexts, you will need to recreate the contexts in your new organization.
-
Invite your teammates to the new organization (the one that is integrated with the CircleCI GitHub App) using the instructions on this page.
-
If you are on a paid pricing plan and followed step 6:
-
Navigate back to the "old" organization and select
. -
Select the next to the "new" organization to remove the shared relationship between the "new" and "old" organizations.
-
Select Transfer Plan and follow the instructions to transfer the plan from the "old" organization to the "new" organization.
-
-
At this point, you will be left with a GitHub App-integrated organization that has the same payment plan and projects as your previous organization. If you get logged out, you can continue to use the "Login with GitHub" button on the CircleCI login page as long as the old organization is not deleted.
Data from Insights and historical pipeline runs will not be present in your new organization. Contexts will not be present until you recreate them for your new org. |
Currently not supported
If one of these pieces of functionality is especially critical to you, tell us why.
The following sections are features of CircleCI which are not currently supported. These features are planned for future releases.
Manual trigger pipeline option
The ability to manually trigger a pipeline from the web app is not currently supported for GitHub App projects.
Restrict a context to a security group
The ability to restrict a context to a security group is not supported for GitHub App projects.
In-app config editor
The in-app config editor is currently only available for GitHub App accounts during project creation.
Account integrations
You cannot currently manage the connection with GitHub outside of the project setup, trigger, and configuration settings. CircleCI is working on enabling users to manage their users’ GitHub identity as part of their user profile’s account integration settings.
Scheduled pipelines
The ability to schedule pipelines is not currently supported for GitHub App projects. This feature is planned for a future release.
Build forked pull requests
The Build forked pull requests feature is not currently supported.
Passing secrets to forked pull requests
Passing secrets to forked pull requests is not currently supported.
Stop building
GitHub App integrations do not currently support the Stop Building option that can normally be found in Project settings.
The recommendation is to either:
-
Suspend your installation. This would stop sending all events to CircleCI, so all builds will stop. This option is available in GitHub Organization settings under the GitHub Apps menu option.
-
Stop a single project from sending events to CircleCI. This option is available in GitHub Organization settings under the GitHub Apps menu option. Under Repository access, select Only select repositories and deselect the repository you want to stop building.
Additional SSH keys only
Deploy keys and user keys are not used by GitHub App integrations. All keys are stored in Add additional SSH keys.
. If you are looking to set up an SSH key to check out code from additional repositories in GitHub, seeTest Insights
Test Insights is currently not supported.
Only build pull requests
The Only Build Pull Requests option (usually available in
or within trigger setup options) is not currently supported for GitHub App integrations