Skip to content

Commit 6064249

Browse files
authored
ci: Use pull_request instead of pull_request_target in compatibility action (#2883)
1 parent e49701d commit 6064249

File tree

2 files changed

+44
-83
lines changed

2 files changed

+44
-83
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Check compatibility
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check-compatibility:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout the PR
12+
uses: actions/checkout@v3
13+
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.10"
17+
18+
- name: Extract PR public interfaces
19+
run: |
20+
make init
21+
bin/public_interface.py extract > "${{ runner.temp }}"/interfaces.new.json
22+
23+
- name: Backup PR bin/public_interface.py
24+
run: |
25+
# Keep a copy of bin/public_interface.py
26+
# So we are using the same bin/public_interface.py to process old/new codebase.
27+
cp bin/public_interface.py "${{ runner.temp }}"/public_interface.py
28+
29+
- name: Checkout the base
30+
uses: actions/checkout@v3
31+
with:
32+
ref: "${{ github.base_ref }}"
33+
34+
- name: Extract original public interfaces
35+
run: |
36+
make init
37+
# Recover bin/public_interface.py
38+
cp "${{ runner.temp }}"/public_interface.py bin/public_interface.py
39+
bin/public_interface.py extract > "${{ runner.temp }}"/interfaces.original.json
40+
41+
- name: Detect compatibility breaking changes
42+
id: detect
43+
run: |
44+
bin/public_interface.py check "${{ runner.temp }}"/interfaces.original.json "${{ runner.temp }}"/interfaces.new.json

.github/workflows/check_interface_compatibility.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)