From f5f5c57b77aa080ffa127a270f4ecca967e16537 Mon Sep 17 00:00:00 2001 From: CritasWang Date: Fri, 14 Feb 2025 15:06:46 +0800 Subject: [PATCH 1/2] add check --- .github/workflows/alioss-check.yml | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/alioss-check.yml diff --git a/.github/workflows/alioss-check.yml b/.github/workflows/alioss-check.yml new file mode 100644 index 000000000..3bf77eebe --- /dev/null +++ b/.github/workflows/alioss-check.yml @@ -0,0 +1,38 @@ +name: Check TODOs and FIXMEs in Changed Files + +on: + push: + branches: + - main + pull_request: + branches: + - main + # allow manually run the action: + workflow_dispatch: + +jobs: + todo-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Check for alioss in changed files + run: | + # Fetch the target branch + git fetch origin $GITHUB_BASE_REF + + git switch -c check_branch + + # Get the diff of the changes + DIFF=$(git diff origin/$GITHUB_BASE_REF check_branch) + + + # Check the diff for alioss + if echo "$DIFF" | grep -Eq '^\+.*(alioss)'; then + echo "alioss found in the changes. Please use upload to src/.vuepress/public/img." + # exit 1 + else + echo "No alioss found in changed content." + fi From faf89c874502ccf73518515bd626f85777c7c132 Mon Sep 17 00:00:00 2001 From: CritasWang Date: Fri, 14 Feb 2025 15:07:46 +0800 Subject: [PATCH 2/2] change name --- .github/workflows/alioss-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/alioss-check.yml b/.github/workflows/alioss-check.yml index 3bf77eebe..cfa696fbb 100644 --- a/.github/workflows/alioss-check.yml +++ b/.github/workflows/alioss-check.yml @@ -1,4 +1,4 @@ -name: Check TODOs and FIXMEs in Changed Files +name: Check alioss in Changed Files on: push: