diff --git a/README.md b/README.md index 6f3c4a3..f069fbd 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ - [`branch-prefix`](#branch-prefix) - [`create-pull-request`](#create-pull-request) - [`version-rule` and `use-dev-suffix`](#version-rule-and-use-dev-suffix) + - [`token`](#token) ## `ni/python-actions/setup-python` @@ -252,3 +253,14 @@ The defaults are `version-rule=patch` and `use-dev-suffix=true`, which have the When you are ready to exit the "dev" phase, you should manually update the version number to the desired release version before creating a release in GitHub. + +#### `token` + +The default GITHUB_TOKEN cannot trigger PR workflows, so the generated pull request will not run any +status checks. You can work around this by using `token` to specify a token that is saved in a +repo/org secret. + +See [Triggering further workflow +runs](https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs) +in the `create-pull-request` action documentation for more info about this problem and other +solutions to it. diff --git a/update-project-version/action.yml b/update-project-version/action.yml index d7f2cba..65c900f 100644 --- a/update-project-version/action.yml +++ b/update-project-version/action.yml @@ -12,6 +12,12 @@ inputs: Specifies whether to create a pull request. Set this to false to update the project version without creating a pull request. default: true + token: + description: > + GitHub token to use to create the pull request. The default GITHUB_TOKEN + cannot trigger PR workflows (i.e., it will not run PR status checks). You + can use this input to specify a PAT that is saved in a repo/org secret. + default: ${{ github.token }} version-rule: description: > Specifies the rule for how to update the version number, such as "major", @@ -58,6 +64,7 @@ runs: branch: ${{ steps.set-vars.outputs.branch-name }} commit-message: "chore: Update project version - ${{ steps.set-vars.outputs.base-branch }}" title: "chore: Update project version - ${{ steps.set-vars.outputs.base-branch }}" + token: ${{ inputs.token }} # The workflow log currently points to the run, not the specific job # within that run. Linking to a specific job requires the numeric job id, # which is not available in the github context.