Skip to content

Commit 384b9db

Browse files
authored
add check (#555)
* add check * change name
1 parent f00eeaf commit 384b9db

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/alioss-check.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check alioss in Changed Files
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
# allow manually run the action:
11+
workflow_dispatch:
12+
13+
jobs:
14+
todo-check:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Check for alioss in changed files
22+
run: |
23+
# Fetch the target branch
24+
git fetch origin $GITHUB_BASE_REF
25+
26+
git switch -c check_branch
27+
28+
# Get the diff of the changes
29+
DIFF=$(git diff origin/$GITHUB_BASE_REF check_branch)
30+
31+
32+
# Check the diff for alioss
33+
if echo "$DIFF" | grep -Eq '^\+.*(alioss)'; then
34+
echo "alioss found in the changes. Please use upload to src/.vuepress/public/img."
35+
# exit 1
36+
else
37+
echo "No alioss found in changed content."
38+
fi

0 commit comments

Comments
 (0)