From abfe2c78dec3087601288460afa1b9c97fa110f1 Mon Sep 17 00:00:00 2001 From: cooper-lzy <78672629+cooper-lzy@users.noreply.github.com> Date: Thu, 12 Jan 2023 11:32:17 +0800 Subject: [PATCH] add auto cherry pick (#2474) --- .github/workflows/auto_cherry_pick.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/auto_cherry_pick.yml diff --git a/.github/workflows/auto_cherry_pick.yml b/.github/workflows/auto_cherry_pick.yml new file mode 100644 index 0000000000..7bccf3a6c8 --- /dev/null +++ b/.github/workflows/auto_cherry_pick.yml @@ -0,0 +1,38 @@ +name: Auto Cherry Pick +on: + workflow_dispatch: + inputs: + pr_label: + description: "Cherry pick label such as 'cherry-pick-v3.2'" + required: true + +defaults: + run: + shell: bash + +jobs: + auto-cherry-pick: + #if: ${{ startsWith(github.event.pull_request.labels.*.name, 'cherry-pick-') && github.event.pull_request.merged == true }} + runs-on: [self-hosted, nebula-fast] + container: + image: reg.vesoft-inc.com/dashboard/dashboard-dev:centos7 + credentials: + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_PASSWORD }} + steps: + - name: keep workspace empty + run: | + rm -rf * + - name: git config set + env: + GH_BOT_PAT: ${{ secrets.GITHUB_TOKEN }} + run: | + git config --global url."https://${GH_BOT_PAT}:x-oauth-basic@github.com/".insteadOf "https://github.com/" + export GOPRIVATE="github.com/vesoft-inc" + - name: auto cherry pick + uses: xigongdaEricyang/cherry-pick-robot@with-python + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + pr_label: ${{ github.event.inputs.pr_label }} + #pr_num: ${{ github.event.pull_request.number }} + auto_merge: false