[openwrt/openwrt] CI: labeler: fix wrong label for pr targeting stable branch

LEDE Commits lede-commits at lists.infradead.org
Wed Nov 30 16:57:14 PST 2022


ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/7d63c39bf4c1e607f12905258f3efc33d40e7716

commit 7d63c39bf4c1e607f12905258f3efc33d40e7716
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Dec 1 01:46:03 2022 +0100

    CI: labeler: fix wrong label for pr targeting stable branch
    
    The label used for stable branch is in the form of
    release/[0-9][0-9].[0-9][0-9]
    Currently we apply the name of the target branch as the label, fix this
    and correctly use the current label.
    
    (cherry picked from commit af8bc8e51b6daef65c497522b67a1dd9d0cdab84)
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .github/workflows/labeler.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 62a895a68b..5f82b88a50 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -22,12 +22,12 @@ jobs:
         id: check-branch
         run: |
           if echo "${{ github.base_ref }}" | grep -q -E 'openwrt-[0-9][0-9]\.[0-9][0-9]'; then
-              echo "apply-tag=yes" >> $GITHUB_OUTPUT
+              echo "release-tag=$(echo ${{ github.base_ref }} | sed 's/openwrt-/release\//')" >> $GITHUB_OUTPUT
           fi
 
       - uses: buildsville/add-remove-label at v2.0.0
-        if: ${{ steps.check-branch.outputs.apply-tag }}
+        if: ${{ steps.check-branch.outputs.release-tag }}
         with:
           token: ${{secrets.GITHUB_TOKEN}}
-          labels: ${{ github.base_ref }}
+          labels: ${{ steps.check-branch.outputs.release-tag }}
           type: add




More information about the lede-commits mailing list