From 44a5cfdbc3e9ed48a3a8882cc99d24969f06a51f Mon Sep 17 00:00:00 2001 From: vector Date: Sun, 19 Mar 2023 09:24:04 +0800 Subject: [PATCH] chore: remove some workflows (#3400) --- .github/workflows/backup/auto-assign.yml | 19 ----- .../backup/delete-stale-releases.yml | 48 ----------- .github/workflows/codeql.yml | 42 --------- .github/workflows/config/auto-assign.yml | 7 -- .github/workflows/config/codeql.yml | 7 -- .github/workflows/create-issue-branch.yml | 16 ---- .github/workflows/deploy-sites.yml | 78 ----------------- .github/workflows/{backup => }/gitleaks.yml | 0 .github/workflows/preview.yml | 85 ------------------- .github/workflows/report-monthly.yml | 16 ---- .github/workflows/report-weekly.yml | 16 ---- .github/workflows/stale.yml | 58 ------------- .github/workflows/sync-labels.yml | 21 ----- .github/workflows/sync-to-gitee.yml | 34 -------- 14 files changed, 447 deletions(-) delete mode 100644 .github/workflows/backup/auto-assign.yml delete mode 100644 .github/workflows/backup/delete-stale-releases.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/config/auto-assign.yml delete mode 100644 .github/workflows/config/codeql.yml delete mode 100644 .github/workflows/create-issue-branch.yml delete mode 100644 .github/workflows/deploy-sites.yml rename .github/workflows/{backup => }/gitleaks.yml (100%) delete mode 100644 .github/workflows/preview.yml delete mode 100644 .github/workflows/report-monthly.yml delete mode 100644 .github/workflows/report-weekly.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/sync-labels.yml delete mode 100644 .github/workflows/sync-to-gitee.yml diff --git a/.github/workflows/backup/auto-assign.yml b/.github/workflows/backup/auto-assign.yml deleted file mode 100644 index d85ec76d96..0000000000 --- a/.github/workflows/backup/auto-assign.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: 🧑‍ Auto Assign -on: - issues: - types: [opened] - pull_request_target: - types: [opened] -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: wow-actions/auto-assign@v1 - with: - GITHUB_TOKEN: ${{ env.BOT_TOKEN }} - CONFIG_FILE: .github/workflows/config/auto-assign.yml diff --git a/.github/workflows/backup/delete-stale-releases.yml b/.github/workflows/backup/delete-stale-releases.yml deleted file mode 100644 index cef4da8985..0000000000 --- a/.github/workflows/backup/delete-stale-releases.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: 🚫 Delete Stale Releases -# on: -# repository_dispatch: -# types: [released] -# jobs: -# clean: -# runs-on: ubuntu-latest -# steps: -# - uses: wow-actions/use-app-token@v2 -# with: -# app_id: ${{ secrets.APP_ID }} -# private_key: ${{ secrets.PRIVATE_KEY }} -# -# - uses: wow-actions/delete-stale-releases@v1 -# with: -# GITHUB_TOKEN: ${{ env.BOT_TOKEN }} -# delete_tags: true -# keep_latest_count: 3 -# group: '(?!^)@.*$' -# exclude: | -# @antv/x6@** -# @antv/x6-common@** -# @antv/x6-geometry@** -# @antv/x6-plugin-**@** -# @antv/x6-vue-shape@** -# @antv/x6-react-shape@** -# @antv/x6-angular-shape@** -# @antv/x6-react-components@** - -# delete all releases and tag -on: - push: - branches: - - master -jobs: - clean: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: wow-actions/delete-stale-releases@v1 - with: - GITHUB_TOKEN: ${{ env.BOT_TOKEN }} - delete_tags: true - keep_latest_count: -1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 2a3bc26940..0000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: ⛵️ CodeQL - -on: - push: - branches: [ "master", "bot", "gh-pages", "v1" ] - pull_request: - branches: [ "master" ] - schedule: - - cron: "41 2 * * 1" - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ javascript ] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - config-file: ./.github/workflows/config/codeql.yml - queries: +security-and-quality - - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{ matrix.language }}" diff --git a/.github/workflows/config/auto-assign.yml b/.github/workflows/config/auto-assign.yml deleted file mode 100644 index c0f746edef..0000000000 --- a/.github/workflows/config/auto-assign.yml +++ /dev/null @@ -1,7 +0,0 @@ -assignees: - - NewByVector -reviewers: - - bubkoo - - NewByVector -skipKeywords: - - wip diff --git a/.github/workflows/config/codeql.yml b/.github/workflows/config/codeql.yml deleted file mode 100644 index 902e2633b2..0000000000 --- a/.github/workflows/config/codeql.yml +++ /dev/null @@ -1,7 +0,0 @@ -paths-ignore: - - sites/public -query-filters: - - exclude: - id: js/use-before-declaration - - exclude: - id: js/polynomial-redos diff --git a/.github/workflows/create-issue-branch.yml b/.github/workflows/create-issue-branch.yml deleted file mode 100644 index 944eee93c0..0000000000 --- a/.github/workflows/create-issue-branch.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: 🚧 Create Issue Branch -on: - issue_comment: - types: [created] -jobs: - cib: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: robvanderleek/create-issue-branch@main - env: - GITHUB_TOKEN: ${{ env.BOT_TOKEN }} diff --git a/.github/workflows/deploy-sites.yml b/.github/workflows/deploy-sites.yml deleted file mode 100644 index 5bae5b1aa5..0000000000 --- a/.github/workflows/deploy-sites.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: 🚀 Deploy Sites -on: - repository_dispatch: - types: [released] -jobs: - deploy: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - steps: - - name: ⤵️ Checkout - uses: actions/checkout@v3 - - name: 🎉 Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: 🌱 Get Yarn Cache Directory - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: 🚸 Setup Cache - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - ## cache webpack(babel-loader, eslint-loader) - - name: 💩 Setup Webpack Cache - uses: actions/cache@v2 - with: - path: | - node_modules - sites/x6-sites-demos/packages/**/node_modules - key: ${{ runner.os }}-webpack-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-webpack- - - ## cache sites - - name: 💩 Setup Sites Cache - uses: actions/cache@v2 - with: - path: sites/x6-sites/static/demos - key: ${{ runner.os }}-sites-${{ hashFiles('./packages/x6/package.json', './sites/x6-sites-demos/**/src') }} - restore-keys: | - ${{ runner.os }}-sites- - - - name: 🚧 Prepare - run: yarn global add lerna - - - name: 🚀 Bootstrap - run: yarn bootstrap - - - name: 🧲 Build Apps - run: yarn build:apps - - - name: 📦 Build Demos - run: yarn build:demos - - - name: ✨ Build Sites - run: yarn build:sites - - - name: 🔑 Generate Token - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - - name: ✅ Deploy sites - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ env.BOT_TOKEN }} - publish_dir: ./sites/x6-sites/public - publish_branch: gh-pages diff --git a/.github/workflows/backup/gitleaks.yml b/.github/workflows/gitleaks.yml similarity index 100% rename from .github/workflows/backup/gitleaks.yml rename to .github/workflows/gitleaks.yml diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml deleted file mode 100644 index 4dd38e7952..0000000000 --- a/.github/workflows/preview.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: 🔂 Surge PR Preview -on: - pull_request_target: - paths: - - sites/x6-sites/** - - sites/x6-sites-demos/** - - sites/x6-sites-demos-helper/** - - examples/x6-app-** -jobs: - surge: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - steps: - - uses: actions/checkout@v3 - - - name: 🌱 Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: 🚸 Setup yarn cacha - uses: actions/cache@v2 - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - ## cache webpack(babel-loader, eslint-loader) - - name: 💩 Setup webpack cache - uses: actions/cache@v2 - with: - path: | - node_modules - sites/x6-sites-demos/packages/**/node_modules - key: ${{ runner.os }}-webpack-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-webpack- - - ## cache sites - - name: 💩 Setup sites cache - uses: actions/cache@v2 - with: - path: sites/x6-sites/static/demos - key: ${{ runner.os }}-sites-${{ hashFiles('./packages/x6/package.json', './sites/x6-sites-demos/**/src') }} - restore-keys: | - ${{ runner.os }}-sites- - - - name: 🎉 Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - - name: 🚧 Prepare Environment - run: | - yarn global add lerna - - - name: 🚀 Bootstrap - run: yarn bootstrap - - - name: 📦 Build Demos - run: yarn build:demos - - - name: 🧲 Build Apps - run: yarn build:apps - - - name: ✨ Build Sites - run: yarn build:sites - - - name: 🔑 Generate Token - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - - name: ✅ Deploy Sites - uses: afc163/surge-preview@v1 - with: - surge_token: ${{ secrets.SURGE_TOKEN }} - github_token: ${{ env.BOT_TOKEN }} - build: | - echo Create sites preview - dist: sites/x6-sites/public diff --git a/.github/workflows/report-monthly.yml b/.github/workflows/report-monthly.yml deleted file mode 100644 index db0322f8e0..0000000000 --- a/.github/workflows/report-monthly.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: 📆 Monthly Report -on: - schedule: - - cron: '0 3 1 * *' -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: wow-actions/activity-report@v1 - with: - GITHUB_TOKEN: ${{ env.BOT_TOKEN }} diff --git a/.github/workflows/report-weekly.yml b/.github/workflows/report-weekly.yml deleted file mode 100644 index 001516363a..0000000000 --- a/.github/workflows/report-weekly.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: 📆 Weekly Report -on: - schedule: - - cron: '30 17 * * 5' -jobs: - run: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: wow-actions/activity-report@v1 - with: - GITHUB_TOKEN: ${{ env.BOT_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index c5904c839f..0000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: 👻 Stale -on: - schedule: - - cron: "0 0 * * *" -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: actions/stale@v3 - with: - repo-token: ${{ env.BOT_TOKEN }} - stale-issue-message: | - Hiya! - - This issue has gone quiet. Spooky quiet. 👻 - - We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! - - As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out [contribute](https://github.com/antvis/X6/blob/master/CONTRIBUTING.md) for more information about opening PRs, triaging issues, and contributing! - - Thanks for being a part of the AntV community! 💪💯 - - close-issue-message: | - Hey again! - - It’s been 60 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot 🤖, so if I’ve closed this issue in error, I’m `HUMAN_EMOTION_SORRY`. Please feel free to comment on this issue or create a new one if you need anything else. - - As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out [contribute](https://github.com/antvis/X6/blob/master/CONTRIBUTING.md) for more information about opening PRs, triaging issues, and contributing! - - Thanks again for being part of the AntV community! 💪💯 - - stale-pr-message: | - Hiya! - - This PR has gone quiet. Spooky quiet. 👻 - - We get a lot of PRs, so we currently close PRs after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this PR or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this PR open! - - Thanks for being a part of the AntV community! 💪💯 - - close-pr-message: | - Hey again! - - It’s been 60 days since anything happened on this PR, so our friendly neighborhood robot (that’s me!) is going to close it. Please keep in mind that I’m only a robot 🤖, so if I’ve closed this PR in error, I’m `HUMAN_EMOTION_SORRY`. Please feel free to comment on this PR or create a new one if you need anything else. - - Thanks again for being part of the AntV community! 💪💯 - - days-before-stale: 20 - days-before-close: 40 - stale-issue-label: 'stale' - exempt-issue-label: 'not-stale,awaiting-approval,work-in-progress' - stale-pr-label: 'stale' - exempt-pr-label: 'not-stale,awaiting-approval,work-in-progress' diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml deleted file mode 100644 index 44cc89644a..0000000000 --- a/.github/workflows/sync-labels.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: 🔄 Sync Labels -on: - push: - branches: - - master - paths: - - .github/workflows/config/labels.yml -jobs: - sync: - runs-on: ubuntu-latest - steps: - - uses: wow-actions/use-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - uses: micnncim/action-label-syncer@v1 - env: - GITHUB_TOKEN: ${{ env.BOT_TOKEN }} - with: - manifest: .github/workflows/config/labels.yml diff --git a/.github/workflows/sync-to-gitee.yml b/.github/workflows/sync-to-gitee.yml deleted file mode 100644 index 5a0bcade33..0000000000 --- a/.github/workflows/sync-to-gitee.yml +++ /dev/null @@ -1,34 +0,0 @@ -# https://github.com/marketplace/actions/gitee-pages-action -# 配置步骤如下 -# 1. 在命令行终端或 Git Bash 使用命令 ssh-keygen -t rsa -C "youremail@example.com" 生成 SSH Key,注意替换为自己的邮箱。生成的 id_rsa 是私钥,id_rsa.pub 是公钥。(⚠️注意此处不要设置密码) -# 2. 在 GitHub 项目的「​Settings -> Secrets」路径下配置好命名为 GITEE_RSA_PRIVATE_KEY 和 GITEE_PASSWORD 的两个密钥。其中:GITEE_RSA_PRIVATE_KEY 存放 id_rsa 私钥;GITEE_PASSWORD 存放 Gitee 帐号的密码。 -# 3. 在 GitHub 的个人设置页面「Settings -> SSH and GPG keys」​ 配置 SSH 公钥(即:id_rsa.pub),命名随意。或者在仓库设置页面添加一个部署公钥。 -# 4. 在 Gitee 的个人设置页面「安全设置 -> SSH 公钥」​ 配置 SSH 公钥(即:id_rsa.pub),命名随意。 - -name: 🔁 Sync to Gitee -on: [push] -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: 🔁 Sync to Gitee - uses: wearerequired/git-mirror-action@master - env: - # 注意在 Settings->Secrets 配置 GITEE_RSA_PRIVATE_KEY - SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }} - with: - # 注意替换为你的 GitHub 源仓库地址 - source-repo: 'git@github.com:antvis/X6.git' - # 注意替换为你的 Gitee 目标仓库地址 - destination-repo: 'git@gitee.com:antv-x6/antv-x6.git' - - name: 📦 Build Gitee Pages - uses: yanglbme/gitee-pages-action@master - with: - # 注意替换为你的 Gitee 用户名 - gitee-username: afc163 - # 注意在 Settings->Secrets 配置 GITEE_PASSWORD - gitee-password: ${{ secrets.GITEE_PASSWORD }} - # 注意替换为你的 Gitee 仓库 - gitee-repo: antv-x6/antv-x6 - # 要部署的分支 - branch: gh-pages