From ae28e4d3e36a6afc67d92025ff563acf67ccc7f8 Mon Sep 17 00:00:00 2001 From: jingjidove Date: Sat, 26 Apr 2025 19:46:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=9C=A8=E6=B5=8B=E8=AF=95=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E4=B8=AD=E5=BF=BD=E7=95=A5=E4=B8=BB=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 514a2ca..2afb9f6 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -5,6 +5,8 @@ on: pull_request: types: [opened] push: + branches-ignore: + - main jobs: build-and-deploy: -- 2.34.1 From ab2afef68aa98d92940eaea94839b0f9a75e3634 Mon Sep 17 00:00:00 2001 From: jingjidove Date: Sat, 26 Apr 2025 20:43:23 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9B=B4=E6=94=B9dev=20action=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 2afb9f6..0c7f4dd 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -1,12 +1,9 @@ -name: test-doc -run-name: Testing doc — ${{ gitea.run_id }} +name: Checking-doc +run-name: Checking doc — ${{ gitea.run_id }} on: workflow_dispatch: pull_request: - types: [opened] - push: - branches-ignore: - - main + types: [opened,synchronize] jobs: build-and-deploy: -- 2.34.1 From 670e0615452338393e225a9f2d2c3020a6659a22 Mon Sep 17 00:00:00 2001 From: szhhwh <3116737282@qq.com> Date: Sat, 26 Apr 2025 21:16:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=A3=80=E6=9F=A5=E6=AD=A5=E9=AA=A4=E4=BB=A5?= =?UTF-8?q?=E5=86=B3=E5=AE=9A=E6=98=AF=E5=90=A6=E6=89=A7=E8=A1=8C=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E5=92=8C=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 0c7f4dd..190d4b3 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -6,7 +6,38 @@ on: types: [opened,synchronize] jobs: + check-file-changes: + runs-on: ubuntu-latest + outputs: + should_run: ${{ steps.filter.outputs.should_run }} + steps: + - name: 🚚 Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 📑 Check changed files + id: filter + run: | + CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} || git diff --name-only HEAD~1 HEAD) + + MD_ONLY=true + for file in $CHANGED_FILES; do + if [[ ! $file =~ \.md$ ]]; then + MD_ONLY=false + break + fi + done + + if [ "$MD_ONLY" = false ] || [ -z "$CHANGED_FILES" ]; then + echo "should_run=true" >> $GITHUB_OUTPUT + else + echo "should_run=false" >> $GITHUB_OUTPUT + fi + build-and-deploy: + needs: check-file-changes + if: ${{ needs.check-file-changes.outputs.should_run == 'true' || github.event_name == 'workflow_dispatch' }} runs-on: ubuntu-latest permissions: contents: read -- 2.34.1 From ff74063961dec2ae4e5e42f59cb8b9e63b9266ca Mon Sep 17 00:00:00 2001 From: szhhwh <3116737282@qq.com> Date: Sat, 26 Apr 2025 21:25:10 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8F=98=E6=9B=B4=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 190d4b3..17f2fa6 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -21,15 +21,15 @@ jobs: run: | CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} || git diff --name-only HEAD~1 HEAD) - MD_ONLY=true + IMPORTANT_FILE_CHANGED=false for file in $CHANGED_FILES; do - if [[ ! $file =~ \.md$ ]]; then - MD_ONLY=false + if [[ $file =~ \.(ts|yaml|json|js)$ ]]; then + IMPORTANT_FILE_CHANGED=true break fi done - if [ "$MD_ONLY" = false ] || [ -z "$CHANGED_FILES" ]; then + if [ "$IMPORTANT_FILE_CHANGED" = true ]; then echo "should_run=true" >> $GITHUB_OUTPUT else echo "should_run=false" >> $GITHUB_OUTPUT -- 2.34.1