File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed
Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 1515
1616jobs :
1717 add-label :
18- name : Add Label
1918 runs-on : ubuntu-latest
19+
2020 steps :
21- - uses : actions/checkout@v2
22- - uses : christianvuerings/add-labels@v1
21+ - name : Check out repository
22+ uses : actions/checkout@v4
23+
24+ - name : Determine label based on target branch
25+ id : determine-label
26+ run : |
27+ if [[ "${{ github.event.pull_request.base.ref }}" == "next" ]]; then
28+ echo "label=2.x" >> $GITHUB_ENV
29+ elif [[ "${{ github.event.pull_request.base.ref }}" == "V3.0" ]]; then
30+ echo "label=3.x" >> $GITHUB_ENV
31+ else
32+ echo "label=" >> $GITHUB_ENV
33+ fi
34+
35+ - name : Add label to Pull Request
36+ if : env.label != ''
37+ uses : actions-ecosystem/action-add-labels@v1
2338 with :
24- labels : |
25- minor release
26- bug
27- env :
28- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39+ github_token : ${{ secrets.GITHUB_TOKEN }}
40+ labels : ${{ env.label }}
2941 lint :
3042 runs-on : ubuntu-latest
3143 steps :
You can’t perform that action at this time.
0 commit comments