mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 22:55:13 +00:00
fix(infra) - Create a step to calculate the inputs for the nightly-release (#10825)
Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
This commit is contained in:
33
.github/actions/calculate-vars/action.yml
vendored
Normal file
33
.github/actions/calculate-vars/action.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: 'Calculate vars'
|
||||||
|
description: 'Calculate commonly used var in our release process'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
dry_run:
|
||||||
|
description: 'Whether or not this is a dry run'
|
||||||
|
type: 'boolean'
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
is_dry_run:
|
||||||
|
description: 'Boolean flag indicating if the current run is a dry-run or a production release.'
|
||||||
|
value: '${{ steps.set_vars.outputs.is_dry_run }}'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: 'composite'
|
||||||
|
steps:
|
||||||
|
- name: 'Print inputs'
|
||||||
|
shell: 'bash'
|
||||||
|
env:
|
||||||
|
JSON_INPUTS: '${{ toJSON(inputs) }}'
|
||||||
|
run: 'echo "$JSON_INPUTS"'
|
||||||
|
|
||||||
|
- name: 'Set vars for simplified logic'
|
||||||
|
id: 'set_vars'
|
||||||
|
shell: 'bash'
|
||||||
|
env:
|
||||||
|
DRY_RUN_INPUT: '${{ inputs.dry_run }}'
|
||||||
|
run: |-
|
||||||
|
is_dry_run="true"
|
||||||
|
if [[ "${DRY_RUN_INPUT}" == "" || "${DRY_RUN_INPUT}" == "false" ]]; then
|
||||||
|
is_dry_run="false"
|
||||||
|
fi
|
||||||
|
echo "is_dry_run=${is_dry_run}" >> "${GITHUB_OUTPUT}"
|
||||||
16
.github/workflows/release-nightly.yml
vendored
16
.github/workflows/release-nightly.yml
vendored
@@ -58,6 +58,18 @@ jobs:
|
|||||||
JSON_INPUTS: '${{ toJSON(github.event.inputs) }}'
|
JSON_INPUTS: '${{ toJSON(github.event.inputs) }}'
|
||||||
run: 'echo "$JSON_INPUTS"'
|
run: 'echo "$JSON_INPUTS"'
|
||||||
|
|
||||||
|
- name: 'Calculate Release Variables'
|
||||||
|
id: 'vars'
|
||||||
|
uses: './.github/actions/calculate-vars'
|
||||||
|
with:
|
||||||
|
dry_run: '${{ github.event.inputs.dry_run }}'
|
||||||
|
|
||||||
|
- name: 'Print Calculated vars'
|
||||||
|
shell: 'bash'
|
||||||
|
env:
|
||||||
|
JSON_VARS: '${{ toJSON(steps.vars.outputs) }}'
|
||||||
|
run: 'echo "$JSON_VARS"'
|
||||||
|
|
||||||
- name: 'Run Tests'
|
- name: 'Run Tests'
|
||||||
if: "${{ github.event_name == 'schedule' || github.event.inputs.force_skip_tests == 'false' }}"
|
if: "${{ github.event_name == 'schedule' || github.event.inputs.force_skip_tests == 'false' }}"
|
||||||
uses: './.github/actions/run-tests'
|
uses: './.github/actions/run-tests'
|
||||||
@@ -101,7 +113,7 @@ jobs:
|
|||||||
wombat-token-core: '${{ secrets.WOMBAT_TOKEN_CORE }}'
|
wombat-token-core: '${{ secrets.WOMBAT_TOKEN_CORE }}'
|
||||||
wombat-token-cli: '${{ secrets.WOMBAT_TOKEN_CLI }}'
|
wombat-token-cli: '${{ secrets.WOMBAT_TOKEN_CLI }}'
|
||||||
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
github-token: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
dry-run: "${{ github.event_name != 'schedule' && github.event.inputs.dry_run == 'true' }}"
|
dry-run: '${{ steps.vars.outputs.is_dry_run }}'
|
||||||
previous-tag: '${{ steps.nightly_version.outputs.PREVIOUS_TAG }}'
|
previous-tag: '${{ steps.nightly_version.outputs.PREVIOUS_TAG }}'
|
||||||
working-directory: './release'
|
working-directory: './release'
|
||||||
skip-branch-cleanup: true
|
skip-branch-cleanup: true
|
||||||
@@ -115,7 +127,7 @@ jobs:
|
|||||||
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.'
|
||||||
github-token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
|
github-token: '${{ secrets.GEMINI_CLI_ROBOT_GITHUB_PAT }}'
|
||||||
dry-run: "${{ github.event_name != 'schedule' && github.event.inputs.dry_run == 'true' }}"
|
dry-run: '${{ steps.vars.outputs.is_dry_run }}'
|
||||||
working-directory: './release'
|
working-directory: './release'
|
||||||
|
|
||||||
- name: 'Create Issue on Failure'
|
- name: 'Create Issue on Failure'
|
||||||
|
|||||||
Reference in New Issue
Block a user