From de11f2b790efa907a4c62c4e934ba16a60e594a0 Mon Sep 17 00:00:00 2001 From: cuisongliu Date: Wed, 19 Apr 2023 20:48:13 +0800 Subject: [PATCH] docs(main): add robot for sealos (#2959) Signed-off-by: cuisongliu --- .github/gh-bot.yml | 39 +++++++++++++++++++++++++++++++++++++ .github/workflows/bot.yml | 23 ++++++++++++++++++++++ .github/workflows/debug.yml | 12 ------------ 3 files changed, 62 insertions(+), 12 deletions(-) create mode 100644 .github/gh-bot.yml create mode 100644 .github/workflows/bot.yml delete mode 100644 .github/workflows/debug.yml diff --git a/.github/gh-bot.yml b/.github/gh-bot.yml new file mode 100644 index 00000000000..8f504499e52 --- /dev/null +++ b/.github/gh-bot.yml @@ -0,0 +1,39 @@ +version: v1 +debug: true +bot: + prefix: /sealos + spe: _ + allowOps: + - sealos-ci-robot + - sealos-release-robot + email: sealos-ci-robot@sealos.io + username: sealos-ci-robot +repo: + org: false + name: sealos-ci-robot/sealos + fork: labring/sealos + +changelog: + script: scripts/changelog.sh {{.Repo.Fork}} + allowOps: + - cuisongliu + reviewers: + - cuisongliu + +release: + retry: 15s + action: Release + allowOps: + - cuisongliu + +message: + success: | + 🤖 says: The action {{.Body}} finished successfully 🎉 + format_error: | + 🤖 says: ‼️ The action format error, please check the format of this action. + permission_error: | + 🤖 says: ‼️ The action no has permission to trigger. + release_error: | + 🤖 says: ‼️ The action release error. + changelog_error: | + 🤖 says: ‼️ The action changelog error. diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml new file mode 100644 index 00000000000..238521bb14d --- /dev/null +++ b/.github/workflows/bot.yml @@ -0,0 +1,23 @@ +name: Github Rebot for Sealos +on: + issue_comment: + types: + - created +env: + GH_TOKEN: "${{ secrets.GH_PAT }}" + GH_REBOT_VERSION: "v0.0.1" +jobs: + comment: + if: startswith(github.event.comment.body, '/sealos') + runs-on: ubuntu-latest + steps: + - name: Checkout the latest code + uses: actions/checkout@v3 + - name: Download gh-rebot + run: | + sudo wget -q https://github.com/labring-actions/gh-rebot/releases/download/${GH_REBOT_VERSION}/gh-rebot_${GH_REBOT_VERSION#v}_linux_amd64.tar.gz + sudo tar -zxf gh-rebot_${GH_REBOT_VERSION#v}_linux_amd64.tar.gz gh-rebot && chmod +x gh-rebot && sudo mv gh-rebot /usr/bin/gh-rebot + gh-rebot version + - name: Using sealos-rebot + run: | + gh-rebot comment diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml deleted file mode 100644 index 8fc11ad64b9..00000000000 --- a/.github/workflows/debug.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Debug On Comment -on: - issue_comment: - types: [created] -jobs: - debug: - name: Event - runs-on: ubuntu-latest - steps: - - name: Print - run: | - echo "${{github.event.comment.author_association}}" \ No newline at end of file