diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index 7e74cf04595..d23ddc1133f 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -14,16 +14,16 @@ jobs: release_id: ${{ steps.create-release.outputs.result }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: node-version: 18 - name: get version run: echo "PACKAGE_VERSION=$(node -p "require('./src-tauri/tauri.conf.json').package.version")" >> $GITHUB_ENV - name: create release id: create-release - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: | const { data } = await github.rest.repos.getLatestRelease({ @@ -52,9 +52,9 @@ jobs: runs-on: ${{ matrix.config.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: node-version: 18 cache: 'yarn' @@ -96,7 +96,7 @@ jobs: steps: - name: publish release id: publish-release - uses: actions/github-script@v6 + uses: actions/github-script@v8 env: release_id: ${{ needs.create-release.outputs.release_id }} with: diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index b988452433b..0aeec4d5975 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -21,7 +21,7 @@ jobs: deploy-preview: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} @@ -47,7 +47,7 @@ jobs: run: npm install --global vercel@latest - name: Cache dependencies - uses: actions/cache@v4 + uses: actions/cache@v5 id: cache-npm with: path: ~/.npm diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8ac96f19356..49cd782ce38 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Log in to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} @@ -36,11 +36,11 @@ jobs: - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build and push Docker image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/remove_deploy_preview.yml b/.github/workflows/remove_deploy_preview.yml index 4846cda2d6a..1582c938312 100644 --- a/.github/workflows/remove_deploy_preview.yml +++ b/.github/workflows/remove_deploy_preview.yml @@ -19,7 +19,7 @@ jobs: delete-deployments: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - name: Extract branch name shell: bash diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index e04e30adbd6..e65cfc26faa 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -1,40 +1,40 @@ -name: Upstream Sync - -permissions: - contents: write - -on: - schedule: - - cron: "0 0 * * *" # every day - workflow_dispatch: - -jobs: - sync_latest_from_upstream: - name: Sync latest commits from upstream repo - runs-on: ubuntu-latest - if: ${{ github.event.repository.fork }} - - steps: - # Step 1: run a standard checkout action - - name: Checkout target repo - uses: actions/checkout@v3 - - # Step 2: run the sync action - - name: Sync upstream changes - id: sync - uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 - with: - upstream_sync_repo: ChatGPTNextWeb/ChatGPT-Next-Web - upstream_sync_branch: main - target_sync_branch: main - target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set - - # Set test_mode true to run tests instead of the true action!! - test_mode: false - - - name: Sync check - if: failure() - run: | - echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,详细教程请查看:https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/README_CN.md#%E6%89%93%E5%BC%80%E8%87%AA%E5%8A%A8%E6%9B%B4%E6%96%B0" - echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed tutorial for instructions: https://github.com/Yidadaa/ChatGPT-Next-Web#enable-automatic-updates" - exit 1 +name: Upstream Sync + +permissions: + contents: write + +on: + schedule: + - cron: "0 0 * * *" # every day + workflow_dispatch: + +jobs: + sync_latest_from_upstream: + name: Sync latest commits from upstream repo + runs-on: ubuntu-latest + if: ${{ github.event.repository.fork }} + + steps: + # Step 1: run a standard checkout action + - name: Checkout target repo + uses: actions/checkout@v6 + + # Step 2: run the sync action + - name: Sync upstream changes + id: sync + uses: aormsby/Fork-Sync-With-Upstream-action@v3.4 + with: + upstream_sync_repo: ChatGPTNextWeb/ChatGPT-Next-Web + upstream_sync_branch: main + target_sync_branch: main + target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set + + # Set test_mode true to run tests instead of the true action!! + test_mode: false + + - name: Sync check + if: failure() + run: | + echo "[Error] 由于上游仓库的 workflow 文件变更,导致 GitHub 自动暂停了本次自动更新,你需要手动 Sync Fork 一次,详细教程请查看:https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/README_CN.md#%E6%89%93%E5%BC%80%E8%87%AA%E5%8A%A8%E6%9B%B4%E6%96%B0" + echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork. Please refer to the detailed tutorial for instructions: https://github.com/Yidadaa/ChatGPT-Next-Web#enable-automatic-updates" + exit 1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index faf7205d9cb..a4aca00adc9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,16 +16,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v6 with: node-version: 18 cache: "yarn" - name: Cache node_modules - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: node_modules key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}