From 8120dc13c5dd138cb232391fe5fbca77c67601d0 Mon Sep 17 00:00:00 2001 From: Xinwei Xiong <3293172751NSS@gmail.com> Date: Thu, 24 Oct 2024 10:25:51 +0800 Subject: [PATCH] feat: add actions Signed-off-by: Xinwei Xiong <3293172751NSS@gmail.com> --- .github/CONTRIBUTING.md | 2 +- .github/sync.yml | 91 ----------------------------- .github/workflows/go-typecheck.yml | 13 +++++ .github/workflows/gpt-translate.yml | 27 --------- .github/workflows/spell-check.yml | 4 +- .github/workflows/sync.yml | 43 -------------- .github/workflows/test.yml | 2 +- .github/workflows/typos.yml | 5 +- 8 files changed, 20 insertions(+), 167 deletions(-) delete mode 100644 .github/sync.yml create mode 100644 .github/workflows/go-typecheck.yml delete mode 100644 .github/workflows/gpt-translate.yml delete mode 100644 .github/workflows/sync.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e31985b..7dded72 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# CONTIRIBUTING +# CONTRIBUTING We expect as many developers as possible to contribute, which is the motivation for our efforts to maintain the community diff --git a/.github/sync.yml b/.github/sync.yml deleted file mode 100644 index 79562f6..0000000 --- a/.github/sync.yml +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright © 2023 telepace open source community. All rights reserved. -# Licensed under the MIT License (the "License"); -# you may not use this file except in compliance with the License. - -# https://github.com/BetaHuhn/repo-file-sync-action - -# Synchronization for the.github repository -telepace/.github: - - source: LICENSE - dest: LICENSE - - source: scripts/LICENSE/ - dest: scripts/LICENSE/ - replace: true - - source: .github/ - dest: .github/ - replace: true - exclude: | - workflows/ - sync.yml - -telepace/community: - - source: LICENSE - dest: LICENSE - - source: scripts/LICENSE/ - dest: scripts/LICENSE/ - replace: true - - source: .github/workflows/ - dest: .github/workflows/ - exclude: - - e2e-test.yml - - sync.yml - - source: .github/ - dest: .github/ - replace: true - exclude: | - sync.yml - -group: - # first group:common to all warehouses - # TODO: add the required warehouse here - - repos: | - telepace/github-label-syncer - telepace/RemoteOps-scripts - telepace/kube-im - telepace/CloudBuildAI - telepace/log - telepace/automation - telepace/telepace - telepace/feishu-sheet-parser - telepace/docs - files: - # - source: .gitingore - # dest: .gitingore - # replace: false - - source: LICENSE - dest: LICENSE - replace: false - - source: .github/workflows/ - dest: .github/workflows/ - exclude: | - e2e-test.yml - sync.yml - - source: scripts/githooks/ - dest: scripts/githooks/ - replace: true - - source: scripts/LICENSE/ - dest: scripts/LICENSE/ - replace: false - - # # second group:omplex layered architecture, common to go language projects - # TODO: add the required warehouse here - # - repos: | - # telepace/github-label-syncer - # telepace/kube-im - # telepace/automation - # telepace/telepace - # files: - # # - source: .gitingore - # # dest: .gitingore - # # replace: false - # - source: LICENSE - # dest: LICENSE - # replace: false - # - source: .github/workflows/ - # dest: .github/workflows/ - # exclude: | - # e2e-test.yml - # sync.yml - # - source: scripts/githooks/ - # dest: scripts/githooks/ - # replace: true \ No newline at end of file diff --git a/.github/workflows/go-typecheck.yml b/.github/workflows/go-typecheck.yml new file mode 100644 index 0000000..c9203fe --- /dev/null +++ b/.github/workflows/go-typecheck.yml @@ -0,0 +1,13 @@ +name: Go Typecheck Workflow Test + +on: [push, pull_request] + +jobs: + comment-language-detector: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Code Typecheck Detector + uses: kubecub/typecheck@main \ No newline at end of file diff --git a/.github/workflows/gpt-translate.yml b/.github/workflows/gpt-translate.yml deleted file mode 100644 index d92e425..0000000 --- a/.github/workflows/gpt-translate.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright © 2023 telepace & Xinwei Xiong(cubxxw). All rights reserved. -# -# Licensed under the MIT License (the "License"); -# you may not use this file except in compliance with the License. - -# .github/workflows/gpt-translate.yml -name: GPT Translate - -on: - issue_comment: - types: [ created ] - -jobs: - gpt_translate: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: Run GPT Translate - if: | - contains(github.event.comment.body, '/gpt-translate') || - contains(github.event.comment.body, '/gt') - uses: 3ru/gpt-translate@v1.0 - with: - apikey: ${{ secrets.OPENAI_API_KEY }} - token: "${{ secrets.BOT_GITHUB_TOKEN }}" diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 0503175..5a574b9 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -14,13 +14,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Check spelling of md uses: crate-ci/typos@master with: files: - ./CONTIRIBUTING.md + ./CONTRIBUTING.md ./README.md - name: Use custom config file diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml deleted file mode 100644 index 9ae133f..0000000 --- a/.github/workflows/sync.yml +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright © 2023 telepace open source community. All rights reserved. -# Licensed under the MIT License (the "License"); -# you may not use this file except in compliance with the License. - -# https://github.com/BetaHuhn/repo-file-sync-action -name: Synchronize telepace public code to other repositories -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - sync: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Run GitHub File Sync - uses: BetaHuhn/repo-file-sync-action@latest - with: - GH_INSTALLATION_TOKEN: "${{ secrets.BOT_GITHUB_TOKEN }}" - CONFIG_PATH: .github/sync.yml - GH_PAT: "${{ secrets.BOT_GITHUB_TOKEN }}" - ORIGINAL_MESSAGE: true - SKIP_PR: true - COMMIT_EACH_FILE: false - COMMIT_BODY: "🤖 kubbot to synchronize the warehouse" - GIT_EMAIL: "3293172751ysy@gmail.com" - GIT_USERNAME: "kubbot" - PR_BODY: 👌 telepace provides automated community services - REVIEWERS: | - kubbot - cubxxw - PR_LABELS: | - file-sync - automerge - ASSIGNEES: | - kubbot \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f3b9845..841a72c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,4 +22,4 @@ jobs: - name: Test build artifacts run: | - # Add your tests here to check the build artifacts + make test diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index 68cdc90..7b9b8dc 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -4,12 +4,13 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Check for typos - uses: codespell-project/actions-codespell@master + uses: codespell-project/actions-codespell@v2 with: check_filenames: true skip: .git,*.png,*.jpg ignore_words_file: .github/workflows/codespell_ignore_words.txt + exclude_file: docs/CODEOWNERS paths: ./CONTRIBUTING.md ./README.md