A set of custom GitHub Actions and reusable workflow used by the Languages Team.
Before using the shared workflows below, please be sure to configure the following settings in your repository:
main
). If Restrict who can push to matching branches and Restrict pushes that create matching branches is checked, then add the bot user
of the GitHub Application that will be used to create pull requests and commits (e.g.; heroku-linguist
).If either of these settings are misconfigured you will encounter errors during steps that create or configure pull requests. For example, an error message of "Pull request User is not authorized for this protected branch" indicates the branch protection rules are missing the GitHub Application bot user.
Prepares a buildpack release by:
You can pin to:
@latest
@v{major}.{minor}.{patch}
@main
name: Prepare Buildpack Releases
on:
workflow_dispatch:
inputs:
bump:
description: "Bump"
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
jobs:
prepare-release:
uses: heroku/languages-github-actions/.github/workflows/_buildpacks-prepare-release.yml@latest
with:
app_id: ${{ vars.GH_APP_ID }}
bump: ${{ inputs.bump }}
secrets:
app_private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
Name | Description | Required | Default |
---|---|---|---|
app_id |
Application ID of GitHub application (e.g. the Linguist App) | true | |
bump |
Which component of the version to increment (major, minor, or patch) | true | |
declarations_starting_version |
Only needed if existing releases have been published but there is no matching release tag in Git. If this is the case, the first git tag that matches a version from your CHANGELOG should be supplied. | false | |
ip_allowlisted_runner |
The GitHub Actions runner to use to run jobs that require IP allow-list privileges | false | pub-hk-ubuntu-24.04-ip |
languages_cli_branch |
The branch to install the Languages CLI from (FOR TESTING) | false | main |
Name | Description | Required |
---|---|---|
app_private_key |
Private key of GitHub application (Linguist) | true |
Performs the release steps for one or more buildpacks by:
buildpack.toml
The following metadata is used for declaring the registry:
[metadata.release] image = { repository = "docker.io/heroku/buildpack-example" }
You can pin to:
@latest
@v{major}.{minor}.{patch}
@main
name: Release Buildpacks
on:
workflow_dispatch:
jobs:
release:
name: Release
uses: heroku/languages-github-actions/.github/workflows/_buildpacks-release.yml@latest
with:
app_id: ${{ vars.GH_APP_ID }}
secrets:
app_private_key: ${{ secrets.GH_APP_PRIVATE_KEY }}
cnb_registry_token: ${{ secrets.CNB_REGISTRY_TOKEN }}
docker_hub_user: ${{ secrets.DOCKER_HUB_USER }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
Name | Description | Required | Default |
---|---|---|---|
app_id |
Application ID of GitHub application (e.g. the Linguist App) | true | |
dry_run |
Flag used for testing purposes to prevent actions that perform publishing operations from executing | false | false |
ip_allowlisted_runner |
The GitHub Actions runner to use to run jobs that require IP allow-list privileges | false | pub-hk-ubuntu-24.04-ip |
languages_cli_branch |
The branch to install the Languages CLI from (FOR TESTING) | false | main |
Name | Description | Required |
---|---|---|
app_private_key |
Private key of GitHub application (e.g. the Linguist App) | true |
cnb_registry_token |
The token of the GitHub user used to interact with the CNB registry | true |
docker_hub_user |
The username to login to Docker Hub with | true |
docker_hub_token |
The token to login to Docker Hub with | true |
Prepares a "classic" buildpack release by:
You can pin to:
@latest
@v{major}.{minor}.{patch}
@main
name: Prepare Buildpack Release
on:
workflow_dispatch:
jobs:
prepare-release:
uses: heroku/languages-github-actions/.github/workflows/_classic-buildpack-prepare-release.yml@latest
secrets: inherit
Name | Description | Required | Default |
---|---|---|---|
custom_update_command |
An additional command to run before changes are committed, which can make use of the env vars EXISTING_VERSION and NEW_VERSION | false |
In addition, the workflow requires that the LINGUIST_*
env vars are available (which are set as organization variables).
The workflow requires that inherit
mode be enabled, so that it can access the LINGUIST_GH_PRIVATE_KEY
organization secret.
Downloads the Languages CLI from a known release or installs using Cargo.
- name: Install Languages CLI
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@latest
You can pin to:
@latest
@v{major}.{minor}.{patch}
@main
Name | Description | Required | Default |
---|---|---|---|
download_url |
The url to download the CLI binary from | false | |
update_rust_toolchain |
Run rustup update before installing the CLI from Cargo |
false | true |
Custom actions are written in Rust and compiled into a command-line application that exposes the following sub-commands:
Usage: actions <COMMAND>
Commands:
generate-buildpack-matrix Generates a JSON list of buildpack information for each buildpack detected
generate-changelog Generates a changelog from one or more buildpacks in a project
prepare-release Bumps the version of each detected buildpack and adds an entry for any unreleased changes from the changelog
update-builder Updates all references to a buildpack in heroku/cnb-builder-images for the given list of builders
help Print this message or the help of the given subcommand(s)