forked from bazel-contrib/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.41 KB
/
Copy pathrelease_add_backports.yaml
File metadata and controls
58 lines (51 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "Release: Add Backports"
on:
workflow_dispatch:
inputs:
prs:
description: 'CSV list of PR numbers to add (e.g., 123,456)'
required: true
type: string
issue:
description: 'The Release Tracking Issue Number (optional)'
required: false
type: string
workflow_call:
inputs:
prs:
description: 'CSV list of PR numbers to add (e.g., 123,456)'
required: true
type: string
issue:
description: 'The Release Tracking Issue Number (optional)'
required: false
type: string
permissions:
issues: write
jobs:
add_backports:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-version: 1.20.0
- name: Add Backports to Tracking Issue
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRS: ${{ inputs.prs }}
ISSUE: ${{ inputs.issue }}
run: |
ARGS=()
if [ -n "$ISSUE" ]; then
ARGS+=("--issue=$ISSUE")
fi
# Convert CSV to array
IFS=',' read -r -a pr_array <<< "$PRS"
bazel run //tools/private/release -- add-backports \
"${pr_array[@]}" \
"${ARGS[@]}"