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-30 05:37:46 +03:00
|
|
|
- run: echo "$GITHUB_CONTEXT"
|
|
|
|
name: 'Debug context'
|
|
|
|
env:
|
|
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
|
|
|
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-01-09 00:21:41 +03:00
|
|
|
if: github.actor == 'vs-mobiletools-engineering-service2'
|
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'
|
2020-10-26 22:56:03 +03:00
|
|
|
# failure if not monojenkins and no labels
|
2021-01-09 00:21:41 +03:00
|
|
|
if: github.actor != 'vs-mobiletools-engineering-service2' && 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-01-09 00:21:41 +03:00
|
|
|
if: github.actor != 'vs-mobiletools-engineering-service2' && join(github.event.pull_request.labels, ',') != ''
|