Skip to content

Commit b59a32a

Browse files
committed
again
1 parent e32e938 commit b59a32a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/count-2.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,48 @@ jobs:
3030
else
3131
echo "stat=false" >> "$GITHUB_OUTPUT"
3232
fi
33+
34+
szdiff:
35+
name: Core MFC Line Difference
36+
permissions:
37+
contents: read
38+
pull-requests: write
39+
runs-on: ubuntu-latest
40+
needs: checkbranch
41+
if: needs.checkbranch.outputs.branchstat == 'false'
42+
steps:
43+
- name: Checkout code from PR branch
44+
uses: actions/checkout@v4
45+
with:
46+
repository: ${{ github.event.pull_request.head.repo.full_name }}
47+
ref: ${{ github.event.pull_request.head.sha }}
48+
path: pr
49+
# the base default to MFC master and cannot be other fork branch for security purpose
50+
- name: Checkout code from MFC master
51+
uses: actions/checkout@v4
52+
with:
53+
path: base
54+
- name: Set up Python 3.10
55+
uses: actions/setup-python@v4
56+
with:
57+
python-version: '3.10'
58+
- name: Count Line Diff
59+
run: |
60+
BASE="$GITHUB_WORKSPACE/base"
61+
PR="$GITHUB_WORKSPACE/pr"
62+
echo "$BASE" >> "GITHUB_ENV"
63+
echo "$PR" >> "GITHUB_ENV"
64+
echo "EOF" >> "$GITHUB_ENV"
65+
# pip install tabulate
66+
# cp "$BASE/sz.py" .
67+
# echo "loc_content<<EOF" >> "$GITHUB_ENV"
68+
# python sz.py "$BASE" "$PR" >> "$GITHUB_ENV"
69+
- name: Comment Code Line Diff
70+
continue-on-error: false
71+
uses: marocchino/sticky-pull-request-comment@v2
72+
with:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
ignore_empty: true
75+
skip_unchanged: true
76+
recreate: true
77+
message: ${{ env.loc_content }}

0 commit comments

Comments
 (0)