From 9b809f0dadcff1b95c4cb4242f2aea7b36af7646 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:36:58 +0300 Subject: [PATCH 1/2] start requiring labels on PRs --- .github/workflows/manage-pr-labels.yml | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/manage-pr-labels.yml diff --git a/.github/workflows/manage-pr-labels.yml b/.github/workflows/manage-pr-labels.yml new file mode 100644 index 0000000000..7dcddd620b --- /dev/null +++ b/.github/workflows/manage-pr-labels.yml @@ -0,0 +1,39 @@ +# Manages labels on PRs before allowing merging +name: Pull Request Labels + +on: + pull_request: + types: + - opened + - labeled + - unlabeled + - synchronize + +# if a second commit is pushed quickly after the first, cancel the first one's build +concurrency: + group: pr-labels-${{ github.head_ref }} + cancel-in-progress: true + +jobs: + Labels: + runs-on: ubuntu-latest + + permissions: + pull-requests: read # needed to utilize required-labels + + steps: + - name: Check for Merge-Blocking Labels # blocks merge if present + uses: mheap/github-action-required-labels@v5 + with: + mode: exactly + count: 0 + labels: 'status: do not merge' + exit_type: failure + + - name: Check for Required Labels # require at least one of these labels + uses: mheap/github-action-required-labels@v5 + with: + mode: minimum + count: 1 + labels: 'type: feature, type: bug, type: refactor, type: translation, ignore changelog' + exit_type: failure From a990db2409fe8886c499dc3f4b9859b02ac11805 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:44:31 +0300 Subject: [PATCH 2/2] add a task for running `./gradlew clean` --- .github/workflows/clean.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/clean.yml diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml new file mode 100644 index 0000000000..c18a35af0a --- /dev/null +++ b/.github/workflows/clean.yml @@ -0,0 +1,22 @@ +name: Clean Gradle + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup Build + uses: ./.github/actions/build_setup + with: + update-cache: true + + - name: Clean + run: ./gradlew clean --build-cache