From 6341c084d370686e43976e64e7de661e40403616 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Mon, 17 Nov 2025 19:18:57 +0800 Subject: [PATCH] Update workflows and dependabot config Added npm and Docker support to dependabot.yml. Updated deploy and image workflows to use latest actions/checkout and set timeouts. Renamed and improved sync workflow to exclude docs and tests, and updated file copy logic. --- .github/dependabot.yml | 40 +++++++++++++++++++ .github/workflows/depoly.yml | 4 +- .github/workflows/image.yml | 3 +- .../{sync-worker-to-page.yml => sync.yml} | 21 +++++++--- 4 files changed, 60 insertions(+), 8 deletions(-) rename .github/workflows/{sync-worker-to-page.yml => sync.yml} (94%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 974b356..c0dc520 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,6 @@ version: 2 updates: + # GitHub Actions dependencies - package-ecosystem: "github-actions" directory: "/" schedule: @@ -17,3 +18,42 @@ updates: - "xixu-me" assignees: - "xixu-me" + + # npm dependencies + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "09:00" + open-pull-requests-limit: 5 + commit-message: + prefix: "deps" + include: "scope" + labels: + - "dependencies" + - "npm" + reviewers: + - "xixu-me" + assignees: + - "xixu-me" + versioning-strategy: increase + + # Docker base images + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + time: "09:00" + open-pull-requests-limit: 5 + commit-message: + prefix: "deps" + include: "scope" + labels: + - "dependencies" + - "docker" + reviewers: + - "xixu-me" + assignees: + - "xixu-me" diff --git a/.github/workflows/depoly.yml b/.github/workflows/depoly.yml index 0f7ebe6..454f59d 100644 --- a/.github/workflows/depoly.yml +++ b/.github/workflows/depoly.yml @@ -1,6 +1,4 @@ name: Deploy Worker -permissions: - contents: read on: push: @@ -23,6 +21,8 @@ jobs: deploy: runs-on: ubuntu-latest timeout-minutes: 60 + permissions: + contents: read steps: - uses: actions/checkout@v5 - name: Deploy Worker diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index c13e275..ab7b095 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -40,6 +40,7 @@ env: jobs: build-and-push: runs-on: ubuntu-latest + timeout-minutes: 30 permissions: contents: read packages: write @@ -48,7 +49,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/sync-worker-to-page.yml b/.github/workflows/sync.yml similarity index 94% rename from .github/workflows/sync-worker-to-page.yml rename to .github/workflows/sync.yml index 4d5cfb7..6e86a8d 100644 --- a/.github/workflows/sync-worker-to-page.yml +++ b/.github/workflows/sync.yml @@ -1,20 +1,32 @@ -name: Sync Worker to Page +name: Sync to Page on: push: branches: - main + paths-ignore: + - '**.md' + - 'LICENSE' + - '.gitignore' + - '.editorconfig' + - '.vscode/**' + - 'docs/**' + - '.prettierrc*' + - '.eslintrc*' + - '.github/ISSUE_TEMPLATE/**' + - '.github/PULL_REQUEST_TEMPLATE/**' workflow_dispatch: jobs: convert-and-sync: runs-on: ubuntu-latest + timeout-minutes: 15 permissions: contents: write steps: - name: Checkout main branch - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: main fetch-depth: 0 @@ -31,9 +43,8 @@ jobs: - name: Copy source code files only run: | - # Copy essential source and config files (no documentation) + # Copy essential source and config files (no documentation, no tests) cp -r src /tmp/page-conversion/ - cp -r test /tmp/page-conversion/ mkdir -p /tmp/page-conversion/.github/workflows cp package.json /tmp/page-conversion/ cp package-lock.json /tmp/page-conversion/ 2>/dev/null || true @@ -173,7 +184,7 @@ jobs: - Update package.json: Change scripts to use Pages commands - Update vitest.config.js: Include functions/ in coverage - Source files only (documentation excluded)." + Source files only (documentation and tests excluded)." - name: Force push to page branch run: |