From b2b56f5be5fd7bd1a1e7d6aa22cc9cc8e03de934 Mon Sep 17 00:00:00 2001 From: 33 Date: Sat, 7 Jan 2023 01:24:12 +0800 Subject: [PATCH] Add: GitHub Action for Pull Request --- .github/workflows/common.yml | 3 ++- .github/workflows/pull-request.yml | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 1f1bcd3..088dc6d 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -6,7 +6,7 @@ on: required: true type: string publish-task: - required: true + required: false type: string jobs: @@ -34,6 +34,7 @@ jobs: ./gradlew clean build --stacktrace - name: Publish + if: ${{ inputs.publish-task }} env: COS_BUCKET: ${{ secrets.COS_BUCKET }} COS_SECRET_ID: ${{ secrets.COS_SECRET_ID }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..4e256f7 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,17 @@ +name: Pull Request +on: + pull_request: + types: + - opened + - synchronize + - reopened + branches: + - '14-develop' + - '15-develop' + +jobs: + build-canary: + name: Build Pull Request + uses: xfl03/MCCustomSkinLoader/.github/workflows/common.yml@14-develop + with: + type: PullRequest \ No newline at end of file