fix(infra) - Simplify cancel in progress and add permission to set status step (#11835)

Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
This commit is contained in:
shishu314
2025-10-24 14:23:50 -04:00
committed by GitHub
parent ee92db7533
commit 4960c47257
2 changed files with 5 additions and 3 deletions

View File

@@ -18,9 +18,9 @@ on:
required: true
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
group: '${{ github.workflow }}-${{ github.head_ref || github.event.workflow_run.head_branch || github.ref }}'
cancel-in-progress: |-
${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') }}
${{ github.event_name != 'push' && github.event_name != 'merge_group' }}
permissions:
contents: 'read'
@@ -99,6 +99,7 @@ jobs:
set_pending_status:
runs-on: 'gemini-cli-ubuntu-16-core'
permissions: 'write-all'
if: "github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'"
needs:
- 'parse_run_context'
@@ -286,6 +287,7 @@ jobs:
set_workflow_status:
runs-on: 'gemini-cli-ubuntu-16-core'
permissions: 'write-all'
if: "github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run'"
needs:
- 'parse_run_context'

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- name: 'Save Repo name'
env:
# Replace with github.event.pull_request.base.repo.full_name when switched to listen on pull request events. This repo name does not contain the org which is needed for checkout.
# Replace with github.event.pull_request.head.repo.full_name when switched to listen on pull request events. This repo name does not contain the org which is needed for checkout.
REPO_NAME: '${{ github.event.repository.name }}'
run: |
mkdir -p ./pr