File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments