A Github action to create a pull request on a downstream Go repository when changes to a library repository are merged.
name: Open PR on downstream repository if relevant changes were made
on:
push:
branches:
- main
jobs:
pr-downstream-if-necessary:
name: Goaltender
runs-on: ubuntu-latest
steps:
- uses: launchdarkly-labs/pr-downstream@v1.4.0
with:
repository: launchdarkly-labs/some-repo
reviewer: ${{ github.actor }}
token: ${{ secrets.PR_CREATOR_GH_TOKEN }}
update-command: |
go get github.com/${{github.repository}}
go mod tidy
go mod vendor
go generate ./...
# If the only changes that were made impacted `go.mod`, `go.sum`, and/or `vendor/modules.txt`, then the change
# is not worth a PR.
relevance-filter: |
- '!(go.mod|go.sum|vendor/modules.txt)'
env:
GOPRIVATE: github.com/launchdarkly-labs/*| name | description | required | default |
|---|---|---|---|
author |
The author name and email address in the format Display Name email@address.com. Defaults to the user who triggered the workflow run. |
false |
${{github.actor}} <${{github.actor}}@users.noreply.github.com> |
auto-merge |
Whether or not to enable "Auto-merge" on the pull request. |
false |
false |
branch |
The pull request branch name. |
false |
bump-${{github.repository}}/patch |
commit-message |
The message to use when committing changes. |
false |
[bot] Bump ${{github.event.repository.name}} |
committer |
The committer name and email address in the format Display Name email@address.com. Defaults to the GitHub Actions bot user. |
false |
GitHub <noreply@github.com> |
dry-run |
Set to true to not really raise a PR. This is useful for testing. |
false |
false |
labels |
A comma or newline-separated list of labels. |
false |
bot |
octosts-identity |
The OctoSTS identity to assume for target repository operations |
false |
pr-downstream |
octosts-scope |
The OctoSTS policy to assume for target repository operations |
false |
launchdarkly |
ref |
The branch, tag, or commit SHA to checkout from the downstream repository. |
false |
main |
repository |
The downstream repository that consumes the library dependency. |
true |
"" |
token |
Github PAT used to open PRs. This token must have write access against the repository. |
false |
"" |
relevance-filter |
A path filter used to determine if any relevant files where changed as a result of the |
false |
- '**' |
reviewers |
A comma or newline-separated list of reviewers (GitHub usernames) to request a review from. |
false |
"" |
team-reviewers |
A comma or newline-separated list of GitHub teams to request a review from. |
false |
"" |
title |
The title of the pull request. |
false |
[bot] Bump ${{github.event.repository.name}} |
update-command |
The command run from the downstream repo that is used to update the library dependency. |
true |
"" |
working-directory |
The relative directory in the downstream repo where all commands will run. |
false |
"" |
| name | description |
|---|---|
pull-request-number |
The pull request number |
pull-request-operation |
The pull request operation performed by the action, |
pull-request-head-sha |
The commit SHA of the pull request branch. |
pull-request-url |
The URL of the pull request. |
This action is a composite action.