[openwrt/openwrt] CI: add support to tag pr targeting stable branch

LEDE Commits lede-commits at lists.infradead.org
Sun Dec 4 08:49:09 PST 2022


ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/ee05f20e9717669d979a8666d74b70fd3eb0e7a9

commit ee05f20e9717669d979a8666d74b70fd3eb0e7a9
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Nov 29 19:53:23 2022 +0100

    CI: add support to tag pr targeting stable branch
    
    Add support to tag pr targeting stable branch matching the simple regex
    of openwrt-[0-9][0-9].[0-9][0-9]. The tag that will be added will match
    the pr target branch.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit b67d284e93ee052e3ea3abb5d3dae55723ce0353)
---
 .github/workflows/labeler.yml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index b67265ca80..62a895a68b 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -17,3 +17,17 @@ jobs:
       - uses: actions/labeler at v4
         with:
           repo-token: '${{ secrets.GITHUB_TOKEN }}'
+
+      - name: Check Branch
+        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
+          fi
+
+      - uses: buildsville/add-remove-label at v2.0.0
+        if: ${{ steps.check-branch.outputs.apply-tag }}
+        with:
+          token: ${{secrets.GITHUB_TOKEN}}
+          labels: ${{ github.base_ref }}
+          type: add




More information about the lede-commits mailing list