mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-22 19:14:33 -07:00
updating app to use cli-robot-pat
This commit is contained in:
@@ -15,11 +15,8 @@ inputs:
|
|||||||
description: 'The branch to merge into.'
|
description: 'The branch to merge into.'
|
||||||
required: true
|
required: true
|
||||||
default: 'main'
|
default: 'main'
|
||||||
app-id:
|
github-token:
|
||||||
description: 'The ID of the GitHub App.'
|
description: 'The GitHub token to use for creating the pull request.'
|
||||||
required: true
|
|
||||||
private-key:
|
|
||||||
description: 'The private key of the GitHub App.'
|
|
||||||
required: true
|
required: true
|
||||||
dry-run:
|
dry-run:
|
||||||
description: 'Whether to run in dry-run mode.'
|
description: 'Whether to run in dry-run mode.'
|
||||||
@@ -29,20 +26,10 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Generate GitHub App Token'
|
|
||||||
id: 'generate_token'
|
|
||||||
if: "inputs.dry-run == 'false'"
|
|
||||||
uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b'
|
|
||||||
with:
|
|
||||||
app-id: '${{ inputs.app-id }}'
|
|
||||||
private-key: '${{ inputs.private-key }}'
|
|
||||||
permission-pull-requests: 'write'
|
|
||||||
permission-contents: 'write'
|
|
||||||
|
|
||||||
- name: 'Create and Approve Pull Request'
|
- name: 'Create and Approve Pull Request'
|
||||||
if: "inputs.dry-run == 'false'"
|
if: "inputs.dry-run == 'false'"
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: '${{ steps.generate_token.outputs.token }}'
|
GH_TOKEN: '${{ inputs.github-token }}'
|
||||||
shell: 'bash'
|
shell: 'bash'
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ jobs:
|
|||||||
branch-name: 'release/${{ steps.nightly_version.outputs.RELEASE_TAG }}'
|
branch-name: 'release/${{ steps.nightly_version.outputs.RELEASE_TAG }}'
|
||||||
pr-title: 'chore(release): bump version to ${{ steps.nightly_version.outputs.RELEASE_VERSION }}'
|
pr-title: 'chore(release): bump version to ${{ steps.nightly_version.outputs.RELEASE_VERSION }}'
|
||||||
pr-body: 'Automated version bump for nightly release.'
|
pr-body: 'Automated version bump for nightly release.'
|
||||||
app-id: '${{ secrets.APP_ID }}'
|
github-token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
|
||||||
private-key: '${{ secrets.PRIVATE_KEY }}'
|
|
||||||
dry-run: '${{ github.event.inputs.dry_run }}'
|
dry-run: '${{ github.event.inputs.dry_run }}'
|
||||||
|
|
||||||
- name: 'Create Issue on Failure'
|
- name: 'Create Issue on Failure'
|
||||||
|
|||||||
@@ -52,14 +52,6 @@ jobs:
|
|||||||
- name: 'Install Script Dependencies'
|
- name: 'Install Script Dependencies'
|
||||||
run: 'npm install yargs'
|
run: 'npm install yargs'
|
||||||
|
|
||||||
- name: 'Generate GitHub App Token'
|
|
||||||
id: 'generate_token'
|
|
||||||
uses: 'actions/create-github-app-token@a8d616148505b5069dccd32f177bb87d7f39123b'
|
|
||||||
with:
|
|
||||||
app-id: '${{ secrets.APP_ID }}'
|
|
||||||
private-key: '${{ secrets.PRIVATE_KEY }}'
|
|
||||||
permission-pull-requests: 'write'
|
|
||||||
permission-contents: 'write'
|
|
||||||
|
|
||||||
- name: 'Configure Git User'
|
- name: 'Configure Git User'
|
||||||
run: |-
|
run: |-
|
||||||
@@ -72,7 +64,7 @@ jobs:
|
|||||||
id: 'create_patch'
|
id: 'create_patch'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
GH_TOKEN: '${{ steps.generate_token.outputs.token }}'
|
GEMINI_CLI_ROBOT_GITHUB_PAT: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
# Capture output and display it in logs using tee
|
# Capture output and display it in logs using tee
|
||||||
|
|||||||
@@ -320,8 +320,7 @@ jobs:
|
|||||||
branch-name: '${{ steps.release_branch.outputs.BRANCH_NAME }}'
|
branch-name: '${{ steps.release_branch.outputs.BRANCH_NAME }}'
|
||||||
pr-title: 'chore(release): bump version to ${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }}'
|
pr-title: 'chore(release): bump version to ${{ needs.calculate-versions.outputs.NEXT_NIGHTLY_VERSION }}'
|
||||||
pr-body: 'Automated version bump to prepare for the next nightly release.'
|
pr-body: 'Automated version bump to prepare for the next nightly release.'
|
||||||
app-id: '${{ secrets.APP_ID }}'
|
github-token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
|
||||||
private-key: '${{ secrets.PRIVATE_KEY }}'
|
|
||||||
dry-run: '${{ github.event.inputs.dry_run }}'
|
dry-run: '${{ github.event.inputs.dry_run }}'
|
||||||
|
|
||||||
- name: 'Create Issue on Failure'
|
- name: 'Create Issue on Failure'
|
||||||
|
|||||||
@@ -214,7 +214,9 @@ The commit has been created with conflict markers for easier manual resolution.
|
|||||||
}
|
}
|
||||||
|
|
||||||
const prCommand = `gh pr create --base ${releaseBranch} --head ${hotfixBranch} --title "${prTitle}" --body "${prBody}"`;
|
const prCommand = `gh pr create --base ${releaseBranch} --head ${hotfixBranch} --title "${prTitle}" --body "${prBody}"`;
|
||||||
run(prCommand, dryRun);
|
run(prCommand, dryRun, {
|
||||||
|
env: { GH_TOKEN: process.env.GEMINI_CLI_ROBOT_GITHUB_PAT },
|
||||||
|
});
|
||||||
|
|
||||||
if (hasConflicts) {
|
if (hasConflicts) {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user