From d1390739483fe22cbb23fe0ea354127b8f80ff90 Mon Sep 17 00:00:00 2001 From: wanghe-fit2cloud Date: Fri, 29 Nov 2024 22:21:35 +0800 Subject: [PATCH] chore: Update workflows --- .github/workflows/add-labels-for-pr.yml | 7 ++-- ...e-drafter.yml => build-publish-to-oss.yml} | 23 ++----------- .github/workflows/build-test.yml | 34 ------------------- .github/workflows/issue-recent-alert.yml | 17 ---------- .github/workflows/issue-untimely-alert.yml | 17 ---------- .github/workflows/llm-code-review.yml | 3 -- .../{build.yml => sonarcloud-scan.yml} | 2 +- .github/workflows/sync2gitee.yml | 1 - .github/workflows/tyops-check.yml | 2 -- 9 files changed, 5 insertions(+), 101 deletions(-) rename .github/workflows/{release-drafter.yml => build-publish-to-oss.yml} (67%) delete mode 100644 .github/workflows/build-test.yml delete mode 100644 .github/workflows/issue-recent-alert.yml delete mode 100644 .github/workflows/issue-untimely-alert.yml rename .github/workflows/{build.yml => sonarcloud-scan.yml} (89%) diff --git a/.github/workflows/add-labels-for-pr.yml b/.github/workflows/add-labels-for-pr.yml index f491d0b81..2b84d0094 100644 --- a/.github/workflows/add-labels-for-pr.yml +++ b/.github/workflows/add-labels-for-pr.yml @@ -1,13 +1,10 @@ on: pull_request - -name: 1Panel 通用 PR 处理 - +name: General PR Handling for 1Panel permissions: pull-requests: write - jobs: generic_handler: - name: 为 PR 添加标签 + name: Add Labels to PR runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/build-publish-to-oss.yml similarity index 67% rename from .github/workflows/release-drafter.yml rename to .github/workflows/build-publish-to-oss.yml index 24d5e06d1..8c62e084b 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/build-publish-to-oss.yml @@ -1,11 +1,8 @@ on: push: - # Sequence of patterns matched against refs/tags tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - + - 'v*' name: Create Release And Upload assets - jobs: create-release: runs-on: ubuntu-latest @@ -36,22 +33,6 @@ jobs: if: startsWith(github.ref, 'refs/tags/') with: draft: true - body: | - # 一、安装和升级 - - ## 1.1 一键安装 - ```sh - curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && sudo bash quick_start.sh - ``` - - ## 1.2 在线升级 - - 登录 1Panel Web 控制台,在页面右下角点击 **【检查更新】** 进行在线升级。 - - >更多信息请查阅在线文档:https://1panel.cn/docs/ - - # 二、更新日志 - files: | dist/*.tar.gz dist/checksums.txt @@ -63,4 +44,4 @@ jobs: access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }} ossutil-version: '1.7.18' - name: Upload Assets to OSS - run: ossutil cp -r dist/ oss://resource-fit2cloud-com/1panel/package/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --only-current-dir --force \ No newline at end of file + run: ossutil cp -r dist/ oss://resource-fit2cloud-com/1panel/package/stable/${{ github.ref_name }}/release/ --include "*.tar.gz" --include "checksums.txt" --only-current-dir --force diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml deleted file mode 100644 index adb2fcdae..000000000 --- a/.github/workflows/build-test.yml +++ /dev/null @@ -1,34 +0,0 @@ -on: - pull_request: - branches: - - dev - push: - branches: - - dev - -name: Build Test - -jobs: - build-linux-binary: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20.2' - - name: Build Web - id: build_frontend - run: | - cd frontend && npm install && npm run build:pro - env: - NODE_OPTIONS: --max-old-space-size=8192 - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.22' - - name: Build Server - uses: goreleaser/goreleaser-action@v6 - with: - args: release --snapshot --clean \ No newline at end of file diff --git a/.github/workflows/issue-recent-alert.yml b/.github/workflows/issue-recent-alert.yml deleted file mode 100644 index 0255783f5..000000000 --- a/.github/workflows/issue-recent-alert.yml +++ /dev/null @@ -1,17 +0,0 @@ -on: - schedule: - - cron: "0 1 * * *" - -name: Check recent handle issues - -jobs: - check-recent-issues-not-handle: - runs-on: ubuntu-latest - steps: - - name: Check recent issues and send msg - uses: jumpserver/action-issues-alert@master - with: - hook: ${{ secrets.WECHAT_GROUP_WEB_HOOK }} - type: recent - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/issue-untimely-alert.yml b/.github/workflows/issue-untimely-alert.yml deleted file mode 100644 index 2d3d7d5e1..000000000 --- a/.github/workflows/issue-untimely-alert.yml +++ /dev/null @@ -1,17 +0,0 @@ -on: - schedule: - - cron: "0 9 * * 1-5" - -name: Check untimely handle issues - -jobs: - check-untimely-handle-issues: - runs-on: ubuntu-latest - steps: - - name: Check untimely issues and send msg - uses: jumpserver/action-issues-alert@master - with: - hook: ${{ secrets.WECHAT_GROUP_WEB_HOOK }} - type: untimely - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/llm-code-review.yml b/.github/workflows/llm-code-review.yml index ce4710487..1914e7c36 100644 --- a/.github/workflows/llm-code-review.yml +++ b/.github/workflows/llm-code-review.yml @@ -1,13 +1,10 @@ name: LLM Code Review - permissions: contents: read pull-requests: write - on: pull_request: types: [opened, reopened, synchronize] - jobs: llm-code-review: runs-on: ubuntu-latest diff --git a/.github/workflows/build.yml b/.github/workflows/sonarcloud-scan.yml similarity index 89% rename from .github/workflows/build.yml rename to .github/workflows/sonarcloud-scan.yml index 4f5671da9..0569abb1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/sonarcloud-scan.yml @@ -17,4 +17,4 @@ jobs: uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/sync2gitee.yml b/.github/workflows/sync2gitee.yml index 60513f0c9..673dc554b 100644 --- a/.github/workflows/sync2gitee.yml +++ b/.github/workflows/sync2gitee.yml @@ -1,6 +1,5 @@ name: sync2gitee on: [push] - jobs: repo-sync: runs-on: ubuntu-latest diff --git a/.github/workflows/tyops-check.yml b/.github/workflows/tyops-check.yml index e665e8e6c..94a861e91 100644 --- a/.github/workflows/tyops-check.yml +++ b/.github/workflows/tyops-check.yml @@ -1,6 +1,5 @@ name: Typos Check on: pull_request - jobs: run: name: Spell Check with Typos @@ -8,6 +7,5 @@ jobs: steps: - name: Checkout Actions Repository uses: actions/checkout@v2 - - name: Check spelling uses: crate-ci/typos@master