Skip to main content
Version: 1.0.x

GitHub

Woodpecker comes with built-in support for GitHub and GitHub Enterprise. To enable GitHub you should configure the Woodpecker server using the following environment variables:

# docker-compose.yml
version: '3'

services:
woodpecker-server:
[...]
environment:
- [...]
+ - WOODPECKER_GITHUB=true
+ - WOODPECKER_GITHUB_CLIENT=${WOODPECKER_GITHUB_CLIENT}
+ - WOODPECKER_GITHUB_SECRET=${WOODPECKER_GITHUB_SECRET}

woodpecker-agent:
[...]

Registrationโ€‹

Register your application with GitHub to create your client id and secret. Grant "repo", "user:email" and "read:org" scopes. It is very important that the authorization callback URL matches your http(s) scheme and hostname exactly with <scheme>://<host>/authorize as the path.

Please use this screenshot for reference:

github oauth setup

Configurationโ€‹

This is a full list of configuration options. Please note that many of these options use default configuration values that should work for the majority of installations.

WOODPECKER_GITHUBโ€‹

Default: false

Enables the GitHub driver.

WOODPECKER_GITHUB_URLโ€‹

Default: https://github.com

Configures the GitHub server address.

WOODPECKER_GITHUB_CLIENTโ€‹

Default: empty

Configures the GitHub OAuth client id. This is used to authorize access.

WOODPECKER_GITHUB_CLIENT_FILEโ€‹

Default: empty

Read the value for WOODPECKER_GITHUB_CLIENT from the specified filepath

WOODPECKER_GITHUB_SECRETโ€‹

Default: empty

Configures the GitHub OAuth client secret. This is used to authorize access.

WOODPECKER_GITHUB_SECRET_FILEโ€‹

Default: empty

Read the value for WOODPECKER_GITHUB_SECRET from the specified filepath

WOODPECKER_GITHUB_MERGE_REFโ€‹

Default: true

TODO

WOODPECKER_GITHUB_SKIP_VERIFYโ€‹

Default: false

Configure if SSL verification should be skipped.