Skip to content

Commit 2ec8244

Browse files
gorkemamisevsk
authored andcommitted
fix: use GitHub App token for docs update PRs
Use the existing KITOPS_BOT GitHub App token instead of the default GITHUB_TOKEN when creating docs update PRs during release. The default token does not trigger downstream workflows (e.g. check-sources), which blocks these PRs from being merged without manual intervention. Fixes #750 Signed-off-by: Gorkem Ercan <gorkem.ercan@gmail.com>
1 parent 6625e94 commit 2ec8244

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/platform-release.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,22 @@ jobs:
248248
fi
249249
gh release create "${release_args[@]}"
250250
251+
- name: Generate a token for docs update PR
252+
id: generate-token
253+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 ## v3.0.0
254+
with:
255+
app-id: ${{ vars.KITOPS_BOT_ID }}
256+
private-key: ${{ secrets.KITOPS_BOT_PRIVATE_KEY }}
257+
owner: kitops-ml
258+
251259
- name: Generate CLI documentation
252260
shell: bash
253261
env:
254-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
262+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
255263
TAG_NAME: ${{ inputs.release_tag || github.ref_name}}
256264
run: |
257265
pushd kitops
266+
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n "x-access-token:${GITHUB_TOKEN}" | base64)"
258267
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
259268
PR_BRANCH="${{ github.ref_name }}-docs-update"
260269
git fetch origin main

0 commit comments

Comments
 (0)