From ad485ce4d685a66170060a101dc9847891754a61 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 21 Feb 2024 21:51:49 +0100 Subject: [PATCH] ci: Split release into a separate PR build workflow Because the release workflow already runs on dev and main, it is not necessary to also trigger it for PRs. --- .github/workflows/build_pull_request.yml | 23 +++++++++++++++++++ ...pull_request.yml => open_pull_request.yml} | 0 .github/workflows/release.yml | 4 ---- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build_pull_request.yml rename .github/workflows/{pull_request.yml => open_pull_request.yml} (100%) diff --git a/.github/workflows/build_pull_request.yml b/.github/workflows/build_pull_request.yml new file mode 100644 index 0000000000..33d4740485 --- /dev/null +++ b/.github/workflows/build_pull_request.yml @@ -0,0 +1,23 @@ +name: Build pull request + +on: + workflow_dispatch: + pull_request: + branches: + - dev + +jobs: + release: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Cache Gradle + uses: burrunan/gradle-cache-action@v1 + + - name: Build + run: ./gradlew build clean diff --git a/.github/workflows/pull_request.yml b/.github/workflows/open_pull_request.yml similarity index 100% rename from .github/workflows/pull_request.yml rename to .github/workflows/open_pull_request.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9c384f380e..2cb2b203b6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,10 +6,6 @@ on: branches: - main - dev - pull_request: - branches: - - main - - dev jobs: release: