GitHub Actions


Prerequisites
  • The Develocity plugin or extension is configured in your build. See the documentation for Gradle, Maven, sbt, npm, Python, or Bazel.

  • You have a Develocity server URL and access key.

Use the Gradle GitHub Action

For Gradle builds, the Gradle GitHub Action instruments your CI jobs and publishes a Build Scan without modifying your build scripts. Pass the stored secret to the action via the develocity-access-key input so it can authenticate with your Develocity server.

Refer to the Gradle GitHub Action documentation for the complete workflow configuration, including the supported environment variables and configuration options.

Other Build Tools

For Maven, sbt, npm, and Python builds there is no equivalent GitHub Action. Expose DEVELOCITY_ACCESS_KEY as an environment variable in your workflow step and ensure the Develocity server URL is already configured in your project:

- name: Build
  env:
    DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
  run: <build-command>

For Bazel builds, authentication uses HTTP headers rather than DEVELOCITY_ACCESS_KEY. Configure the authentication headers in your .bazelrc file as described in the Bazel documentation.

Store the Access Key as a Secret

Store your Develocity access key as a GitHub Actions secret named DEVELOCITY_ACCESS_KEY.

The access key value uses the format «server host name»=«access key»:

develocity.example.com=7w5kbqqjea4vonghohvuyra5bnvszop4asbqee3m3sm6dbjdudtq

Verify the Integration

After your first CI run, open your Develocity server and navigate to Build Scan. Your build should appear there. Install the Common Custom User Data plugin to tag builds as CI and enrich each Build Scan with the Git branch, commit SHA, and a link back to the GitHub Actions workflow run.