From 0b18d83cd4a845d3729104a006e54d9c31e24ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=AE=E5=AD=90=E8=80=97=E8=80=97?= <3116737282@qq.com> Date: Tue, 1 Jul 2025 12:10:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20Dev=20CI=20=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E4=B8=AD=E7=9A=84=E6=96=87=E4=BB=B6=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/dev.yaml | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 515e6bf..85ee9ac 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -6,38 +6,7 @@ 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) - - IMPORTANT_FILE_CHANGED=false - for file in $CHANGED_FILES; do - if [[ $file =~ \.(ts|yaml|json|js|scss)$ ]]; then - IMPORTANT_FILE_CHANGED=true - break - fi - done - - if [ "$IMPORTANT_FILE_CHANGED" = true ]; 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 From 9e903e6948fbbb40bc02ae7c772399b263e4afa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8B=AE=E5=AD=90=E8=80=97=E8=80=97?= <3116737282@qq.com> Date: Tue, 1 Jul 2025 12:12:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=BA=E6=9E=84=E5=BB=BA=E5=92=8C?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E4=BD=9C=E4=B8=9A=E6=B7=BB=E5=8A=A0=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=A0=87=E8=AF=86=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yaml | 2 +- .gitea/workflows/dev.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 077f294..1b68577 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -10,7 +10,7 @@ on: - main jobs: - build-and-deploy: + build-and-deploy(production): runs-on: ubuntu-latest permissions: contents: read diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index 85ee9ac..2d7ffe2 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -6,7 +6,7 @@ on: types: [opened,synchronize] jobs: - build-and-deploy: + build-and-deploy(dev): runs-on: ubuntu-latest permissions: contents: read