mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-29 19:18:33 -07:00
Add pull request workflow
This commit is contained in:
parent
729191722a
commit
9747e3ba98
1 changed files with 28 additions and 0 deletions
28
.github/workflows/pull-requests.yml
vendored
Normal file
28
.github/workflows/pull-requests.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
name: Pull Requests
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
types: [opened, synchronize, edited, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-branch:
|
||||||
|
name: Check Pull Request
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Comment on Pull Request
|
||||||
|
uses: mshick/add-pr-comment@v1
|
||||||
|
if: github.base_ref != 'nightly'
|
||||||
|
with:
|
||||||
|
message: Pull requests must be made to the `nightly` branch. Thanks.
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
repo-token-user-login: 'github-actions[bot]'
|
||||||
|
|
||||||
|
- name: Fail Workflow
|
||||||
|
if: github.base_ref != 'nightly'
|
||||||
|
run: |
|
||||||
|
echo Base: ${{ github.base_ref }}
|
||||||
|
echo Head: ${{ github.head_ref }}
|
||||||
|
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue