forked from bazel-contrib/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 1.95 KB
/
Copy pathon_pr_closed.yaml
File metadata and controls
75 lines (66 loc) · 1.95 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: "On PR Closed"
on:
pull_request:
types: [closed]
permissions:
contents: write
issues: write
pull-requests: read
jobs:
# This job always runs to prevent GHA from marking the run as failed when
# all other jobs are skipped.
noop:
runs-on: ubuntu-latest
steps:
- run: echo "No-op"
parse_pr:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
outputs:
command: ${{ steps.parse.outputs.command }}
pr_number: ${{ steps.parse.outputs.pr_number }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- name: Parse PR
id: parse
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: .github/workflows/on_pr_closed.py
process_backports:
needs: parse_pr
if: needs.parse_pr.outputs.command == 'process-backports'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: read
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: Configure Git Identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Process Backports
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ needs.parse_pr.outputs.pr_number }}
run: |
bazel run //tools/private/release -- on-pr-merged \
"$PR_NUMBER" \
--remote origin \
--no-dry-run
call_complete_sync_changelog:
needs: parse_pr
if: needs.parse_pr.outputs.command == 'complete-sync-changelog'
uses: ./.github/workflows/release_sync_changelog_complete.yaml
secrets: inherit