Setup GitHub Actions Integration
To integrate GitHub Actions with your CI-Engine subscription, follow the steps below:
Navigate to CI-Engine > Integrations.
Click on the (+) Plus sign.
Choose the subscription for which you create the integration.
Choose GitHub Actions as the CI-provider.
Choose a global or custom image for your runners to use.
You can always change the image of the integration later.
Configure the runners to connect to your repository.
Setup a PAT at GitHub.
Provide the full repository name which you’re creating the integration for and you have given the PAT access to. Make sure the repository name is formatted as follows:
<repository-owner>/<repository-name>
.Define a runner timeout, after which a runner without an active build job will be terminated.
Give your integration a name.
Configure a webhook at GitHub.
Update the runs-on label in your GitHub Actions Workflow YAML to the string displayed in the wizard, which has the form
flow-runner-<random string>.
Once you finished the steps above you are ready to build! Simply trigger the Workflow you just updated to run on CI-Engine and check the state of your runners on the detail page of your subscription.
Personal Access Token Configuration
For the runners to authenticate themselves, a fine-grained Personal Access Token needs to be provided. Create a new fine-grained PAT in your GitHub Developer settings and make sure to configure the token as follows:
Set the “Expiration” to No expiration
Under “Repository Access” select Only selected repositories and add the Repository which you’re creating the integration for.
Under “Repository permissions" add Read and Write access for Administration. Note: This access will also enforce Read access for Metadata.
Webhook Configuration
To spawn the runners on demand you need to setup Webhooks in your GitHub pipeline:
In your GitHub repository, go to Settings > Webhooks and click on the Add Webhook-Button
Configure the Payload URL and the Secret that are provided in the Wizard-Step. Alternatively you can find this information on the details page of your integration by clicking on (•••) More button and View Webhook Config.
Under Which events would you like to trigger this webhook? select Let me select individual events and enable Workflow jobs. This event webhook is required for the runners to spawn correctly.
Workflow Configuration
In order for GitHub to know which runner can pick up a job you need to specify runs-on label in your GitHub Actions Workflow. This string needs to be set to the Runner Label provided in the Wizard-Step. Alternatively you can find this information on the details page of your integration. Make sure that all jobs have only this Runner Label configured on the runs-on label or else it cannot be guaranteed that the job gets correctly picked up by the runner.
Last updated