2022-06-20 11:13:30 +00:00
|
|
|
name: 'Pull Request Labeler'
|
|
|
|
on:
|
|
|
|
- pull_request_target
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
labeler:
|
|
|
|
name: Pull Request Labeler
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-12 14:49:46 +00:00
|
|
|
- uses: actions/labeler@v4
|
2022-06-20 11:13:30 +00:00
|
|
|
with:
|
|
|
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
2022-11-29 18:53:23 +00:00
|
|
|
|
|
|
|
- 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
|
2022-12-01 00:46:03 +00:00
|
|
|
echo "release-tag=$(echo ${{ github.base_ref }} | sed 's/openwrt-/release\//')" >> $GITHUB_OUTPUT
|
2022-11-29 18:53:23 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
- uses: buildsville/add-remove-label@v2.0.0
|
2022-12-01 00:46:03 +00:00
|
|
|
if: ${{ steps.check-branch.outputs.release-tag }}
|
2022-11-29 18:53:23 +00:00
|
|
|
with:
|
|
|
|
token: ${{secrets.GITHUB_TOKEN}}
|
2022-12-01 00:46:03 +00:00
|
|
|
labels: ${{ steps.check-branch.outputs.release-tag }}
|
2022-11-29 18:53:23 +00:00
|
|
|
type: add
|