2020-10-26 22:56:03 +03:00
|
|
|
name: Labels verification
|
2020-10-26 21:48:07 +03:00
|
|
|
on:
|
2020-10-26 22:56:03 +03:00
|
|
|
pull_request:
|
|
|
|
types: [opened, reopened, labeled, unlabeled, synchronize]
|
2020-10-26 21:48:07 +03:00
|
|
|
|
|
|
|
jobs:
|
2020-10-26 22:56:03 +03:00
|
|
|
labels-check:
|
2020-10-26 21:48:07 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Labels verification
|
|
|
|
|
|
|
|
steps:
|
2020-10-26 22:56:03 +03:00
|
|
|
- run: exit 0
|
2020-10-30 05:37:46 +03:00
|
|
|
name: 'Monojenkins PR'
|
2020-10-26 22:56:03 +03:00
|
|
|
# always happy if monojenkins
|
2021-10-08 17:32:42 +03:00
|
|
|
if: github.actor == 'vs-mobiletools-engineering-service2' || github.actor == 'github-actions[bot]' || github.actor == 'dotnet-maestro[bot]'
|
2020-10-26 22:56:03 +03:00
|
|
|
|
|
|
|
- run: exit 1
|
2020-10-30 05:37:46 +03:00
|
|
|
name: 'User PR with no labels'
|
2021-09-23 22:15:51 +03:00
|
|
|
# failure if not monojenkins and not dotnet-maestro and no labels
|
2021-10-08 17:32:42 +03:00
|
|
|
if: github.actor != 'vs-mobiletools-engineering-service2' && github.actor != 'dotnet-maestro[bot]' && join(github.event.pull_request.labels, ',') == ''
|
2020-10-26 22:56:03 +03:00
|
|
|
|
|
|
|
- run: exit 0
|
2020-10-30 05:37:46 +03:00
|
|
|
name: 'User PR with labels'
|
2020-10-26 22:56:03 +03:00
|
|
|
# success if not monojenkins but labels
|
2021-10-08 17:32:42 +03:00
|
|
|
if: github.actor != 'vs-mobiletools-engineering-service2' && github.actor != 'dotnet-maestro[bot]' && join(github.event.pull_request.labels, ',') != ''
|