From 666c050d16d78cb9e7c98d80a3b78aded8bda124 Mon Sep 17 00:00:00 2001 From: MicLng Date: Wed, 27 Oct 2021 11:41:54 +0800 Subject: [PATCH 1/3] :construction_worker: support issue auto close and gitee repo auto asny --- .github/workflows/auto-issue.yml | 18 ++++++++++++++++++ .github/workflows/maven.yml | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/auto-issue.yml diff --git a/.github/workflows/auto-issue.yml b/.github/workflows/auto-issue.yml new file mode 100644 index 00000000..29b540bd --- /dev/null +++ b/.github/workflows/auto-issue.yml @@ -0,0 +1,18 @@ +name: PIG Github 自动回复消息 + +on: + issues: + types: [opened] + +jobs: + titlePrefixCheck: + runs-on: ubuntu-latest + steps: + - name: Close Issue + uses: peter-evans/close-issue@v1 + with: + token: ${{ secrets.ACTIONS_BOT_TOKEN }} + comment: + 您好!技术问题请在 https://issue.pig4cloud.com 反馈, + Github 提问不会处理,此issue将自动关闭。 + diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6c9614eb..a8f6ca5d 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,6 +23,14 @@ jobs: java-version: ${{ matrix.java-version }} distribution: 'zulu' + - name: sync-gitee-mirror + if: github.repository == 'pig-mesh/pig' + uses: abersheeran/sync-gitee-mirror@v1-beta + with: + repository: log4j/pig + username: ${{ secrets.GITEE_USERNAME }} + password: ${{ secrets.GITEE_PASSWORD }} + - name: mvn spring-javaformat:validate run: mvn spring-javaformat:validate From 9de07455b755ad2a4c6ecfeb7481734f4c3329a1 Mon Sep 17 00:00:00 2001 From: MicLng Date: Wed, 27 Oct 2021 11:45:28 +0800 Subject: [PATCH 2/3] :construction_worker: support issue auto close and gitee repo auto asny --- .github/workflows/auto-issue.yml | 1 + .github/workflows/maven.yml | 8 -------- .github/workflows/sync-gitee-mirror.yml | 23 +++++++++++++++++++++++ 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/sync-gitee-mirror.yml diff --git a/.github/workflows/auto-issue.yml b/.github/workflows/auto-issue.yml index 29b540bd..a10edf21 100644 --- a/.github/workflows/auto-issue.yml +++ b/.github/workflows/auto-issue.yml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Close Issue + if: github.repository == 'pig-mesh/pig' uses: peter-evans/close-issue@v1 with: token: ${{ secrets.ACTIONS_BOT_TOKEN }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a8f6ca5d..6c9614eb 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,14 +23,6 @@ jobs: java-version: ${{ matrix.java-version }} distribution: 'zulu' - - name: sync-gitee-mirror - if: github.repository == 'pig-mesh/pig' - uses: abersheeran/sync-gitee-mirror@v1-beta - with: - repository: log4j/pig - username: ${{ secrets.GITEE_USERNAME }} - password: ${{ secrets.GITEE_PASSWORD }} - - name: mvn spring-javaformat:validate run: mvn spring-javaformat:validate diff --git a/.github/workflows/sync-gitee-mirror.yml b/.github/workflows/sync-gitee-mirror.yml new file mode 100644 index 00000000..ab2a5f5f --- /dev/null +++ b/.github/workflows/sync-gitee-mirror.yml @@ -0,0 +1,23 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: PIG 代码同步至 gitee + +on: + push: + branches: [ master,dev ] + pull_request: + branches: [ master,dev ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: sync-gitee-mirror + if: github.repository == 'pig-mesh/pig' + uses: abersheeran/sync-gitee-mirror@v1-beta + with: + repository: log4j/pig + username: ${{ secrets.GITEE_USERNAME }} + password: ${{ secrets.GITEE_PASSWORD }} + From 73f4d7702b521b66d1a0608e2548197a99c30f59 Mon Sep 17 00:00:00 2001 From: MicLng Date: Wed, 27 Oct 2021 11:41:54 +0800 Subject: [PATCH 3/3] :construction_worker: support issue auto close and gitee repo auto asny :construction_worker: support issue auto close and gitee repo auto asny :construction_worker: support issue auto close and gitee repo auto asny --- .github/workflows/issue.yml | 23 +++++++++++++++++++++++ .github/workflows/sync-gitee-mirror.yml | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/issue.yml create mode 100644 .github/workflows/sync-gitee-mirror.yml diff --git a/.github/workflows/issue.yml b/.github/workflows/issue.yml new file mode 100644 index 00000000..302d8a43 --- /dev/null +++ b/.github/workflows/issue.yml @@ -0,0 +1,23 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: PIG Github 自动回复消息 + +on: + issues: + types: [opened] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Close Issue + if: github.repository == 'pig-mesh/pig' + uses: peter-evans/close-issue@v1 + with: + issue-number: ${{ github.event.issue.number }} + token: ${{ secrets.ACTIONS_BOT_TOKEN }} + comment: + 您好!技术问题请在 https://issue.pig4cloud.com 反馈, + Github 提问不会处理,此issue将自动关闭。 + diff --git a/.github/workflows/sync-gitee-mirror.yml b/.github/workflows/sync-gitee-mirror.yml new file mode 100644 index 00000000..ab2a5f5f --- /dev/null +++ b/.github/workflows/sync-gitee-mirror.yml @@ -0,0 +1,23 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: PIG 代码同步至 gitee + +on: + push: + branches: [ master,dev ] + pull_request: + branches: [ master,dev ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: sync-gitee-mirror + if: github.repository == 'pig-mesh/pig' + uses: abersheeran/sync-gitee-mirror@v1-beta + with: + repository: log4j/pig + username: ${{ secrets.GITEE_USERNAME }} + password: ${{ secrets.GITEE_PASSWORD }} +