From 3d24e97abdfdffd8f0857a6028e779a6f13f03a4 Mon Sep 17 00:00:00 2001 From: silentrald Date: Wed, 2 Oct 2024 08:29:54 +0800 Subject: [PATCH] [chore] properly add correct label for linux --- .github/workflows/labeler.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index 6046ca9e..f01d2c18 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -8,17 +8,19 @@ jobs: label-linux: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + + - name: Search Linux Term + uses: actions-ecosystem/action-regex-match@v2 + id: regex-match + with: + text: ${{ github.event.issue.body }} + regex: '\# Operating System(\s*)Linux' + flags: m + - name: Add Linux label - if: | - contains(github.event.issue.title, 'linux') || - contains(github.event.issue.body, 'linux') || - contains(github.event.issue.title, 'ubuntu') || - contains(github.event.issue.body, 'ubuntu') || - contains(github.event.issue.title, 'arch') || - contains(github.event.issue.body, 'arch') || - contains(github.event.issue.title, 'kde') || - contains(github.event.issue.body, 'kde') uses: actions-ecosystem/action-add-labels@v1 + if: ${{ steps.regex-match.outputs.match != '' }} with: github_token: ${{ secrets.GH_TOKEN }} labels: linux