Skip to content

Commit 95ed4ae

Browse files
authored
UpdateVersionBranch: pass the App's ID as 'client-id' (#315)
2 parents 8482d36 + e4219c7 commit 95ed4ae

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

‎.github/workflows/UpdateVersionBranch.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ on:
6363
default: 'update/'
6464
app_id:
6565
description: |
66-
ID of a GitHub App with write access to contents, workflows and pull-requests. With 'app_private_key', the
67-
job works with a token of that App instead of the workflow's own token, which can't push a change to a
68-
file in '.github/workflows/'.
66+
ID or Client ID of a GitHub App with write access to contents, workflows and pull-requests. With
67+
'app_private_key', the job works with a token of that App instead of the workflow's own token, which can't
68+
push a change to a file in '.github/workflows/'.
6969
type: string
7070
required: false
7171
default: ''
@@ -121,7 +121,7 @@ jobs:
121121
if: inputs.app_id != ''
122122
uses: actions/create-github-app-token@v3
123123
with:
124-
app-id: ${{ inputs.app_id }}
124+
client-id: ${{ inputs.app_id }}
125125
private-key: ${{ secrets.app_private_key }}
126126
permission-contents: write
127127
permission-workflows: write

‎doc/JobTemplate/Release/UpdateVersionBranch.rst‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,17 @@ app_id
248248
:Type: string
249249
:Required: no
250250
:Default Value: ``''``
251-
:Possible Values: The ID of a GitHub App, or empty.
251+
:Possible Values: The ID or the Client ID of a GitHub App, or empty.
252252
:Description: ID of a GitHub App installed on the repository with write access to *Contents*, *Workflows* and
253253
*Pull requests*. Together with :ref:`JOBTMPL/UpdateVersionBranch/Secret/app_private_key`, the job
254254
creates a token of that App (:gh:`actions/create-github-app-token`) and uses it for all its steps.
255255
|br|
256256
The workflow's own ``GITHUB_TOKEN`` can't push a change to a file in :file:`.github/workflows/` -
257257
no ``permissions:`` key grants that - so a release changing a workflow file needs the App. When
258258
empty, the job uses ``GITHUB_TOKEN``. |br|
259-
The App ID isn't secret, so a repository variable is enough, e.g. ``${{ vars.RELEASE_APP_ID }}``.
259+
The job passes it as ``client-id`` to :gh:`actions/create-github-app-token`, which accepts both: GitHub
260+
takes the App ID and the Client ID as issuer of the App's token. Neither is secret, so a repository
261+
variable is enough, e.g. ``${{ vars.RELEASE_APP_ID }}``.
260262

261263

262264
.. _JOBTMPL/UpdateVersionBranch/Secrets:

0 commit comments

Comments
 (0)