From ea8597362339f1b5d3abbc93db45ac0b3fc85c15 Mon Sep 17 00:00:00 2001 From: Ming Yu Wang <90855268+mwangggg@users.noreply.github.com> Date: Mon, 14 Aug 2023 09:57:16 -0400 Subject: [PATCH] chore(CI): Update CI configs (#183) --- .github/workflows/check-labels.yml | 17 +++++++++++++++++ .github/workflows/ci.yaml | 5 ++++- .github/workflows/labeler.yml | 18 ++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/check-labels.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/workflows/check-labels.yml b/.github/workflows/check-labels.yml new file mode 100644 index 00000000..b2b26551 --- /dev/null +++ b/.github/workflows/check-labels.yml @@ -0,0 +1,17 @@ +name: Check labels not applied + +on: + pull_request: + types: + - opened + - labeled + - unlabeled + - synchronize + +jobs: + check-needs-triage-not-applied: + runs-on: ubuntu-latest + steps: + - name: Fail if needs-triage label applied + if: ${{ contains(github.event.pull_request.labels.*.name, 'needs-triage')}} + run: exit 1 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 001ca1d0..6cf0b501 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,9 @@ on: jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + JVM_version: ['11', '17'] if: ${{ github.repository_owner == 'cryostatio' }} steps: - name: Fail if PR and safe-to-test label NOT applied @@ -39,7 +42,7 @@ jobs: submodules: true - uses: actions/setup-java@v2 with: - java-version: '11' + java-version: ${{ matrix.JVM_version }} distribution: 'temurin' - name: maven-settings uses: s4u/maven-settings-action@v2 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..6976cec5 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,18 @@ +name: Label pull request + +on: + pull_request_target: + types: + - opened + - reopened + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}"