From 0e364bd3ebf6e33016dfe701420bba377e11ecfc Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Fri, 6 Jun 2025 19:07:53 -0500 Subject: [PATCH 1/2] update-project-version: Add `token` input --- README.md | 11 +++++++++++ update-project-version/action.yml | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 6f3c4a3..4e4f9b7 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,13 @@ 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. 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..222c2f2 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, so you can use this 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. From ab19e81186bcb285ccee265dfde7b364f3379035 Mon Sep 17 00:00:00 2001 From: Brad Keryan Date: Mon, 9 Jun 2025 11:45:15 -0500 Subject: [PATCH 2/2] update-project-version: Clarify docs about PR status checks --- README.md | 5 +++-- update-project-version/action.yml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4e4f9b7..f069fbd 100644 --- a/README.md +++ b/README.md @@ -256,8 +256,9 @@ desired release version before creating a release in GitHub. #### `token` -The default GITHUB_TOKEN cannot trigger PR workflows. You can work around this by using `token` to -specify a token that is saved in a repo/org secret. +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) diff --git a/update-project-version/action.yml b/update-project-version/action.yml index 222c2f2..65c900f 100644 --- a/update-project-version/action.yml +++ b/update-project-version/action.yml @@ -15,8 +15,8 @@ inputs: token: description: > GitHub token to use to create the pull request. The default GITHUB_TOKEN - cannot trigger PR workflows, so you can use this to specify a PAT that is - saved in a repo/org secret. + 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: >