diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2022-11-29 19:53:23 +0100 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2022-12-04 17:47:01 +0100 |
commit | ee05f20e9717669d979a8666d74b70fd3eb0e7a9 (patch) | |
tree | e5ed0b7bdc212af6edd71c6bcf1f6fdd677ba02a /.github/workflows/labeler.yml | |
parent | cbce6c6d9519ab86e11c9752910a4c72dd52cb58 (diff) | |
download | upstream-ee05f20e9717669d979a8666d74b70fd3eb0e7a9.tar.gz upstream-ee05f20e9717669d979a8666d74b70fd3eb0e7a9.tar.bz2 upstream-ee05f20e9717669d979a8666d74b70fd3eb0e7a9.zip |
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@gmail.com>
(cherry picked from commit b67d284e93ee052e3ea3abb5d3dae55723ce0353)
Diffstat (limited to '.github/workflows/labeler.yml')
-rw-r--r-- | .github/workflows/labeler.yml | 14 |
1 files changed, 14 insertions, 0 deletions
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@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@v2.0.0 + if: ${{ steps.check-branch.outputs.apply-tag }} + with: + token: ${{secrets.GITHUB_TOKEN}} + labels: ${{ github.base_ref }} + type: add |