-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 1.24 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: PR tests
on:
pull_request_target:
branches:
- main
- develop
jobs:
approve:
if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.user.login != 'dependabot[bot]' }}
runs-on: ubuntu-latest
environment:
name: PR-env
steps:
- name: Approve
run: echo "Test run needs approval"
PR-tests:
needs: [approve]
if: always()
uses: PabloLec/StarryLines/.github/workflows/tests.yml@main
secrets:
MONGO_USER_TEST: ${{ secrets.MONGO_USER_TEST }}
MONGO_SECRET_TEST: ${{ secrets.MONGO_SECRET_TEST }}
MONGO_CLUSTER: ${{ secrets.MONGO_CLUSTER }}
MONGO_DATABASE_TEST: ${{ secrets.MONGO_DATABASE_TEST }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
automerge-dependabot:
runs-on: ubuntu-latest
needs: PR-tests
if: github.actor == 'dependabot[bot]' && github.event.pull_request.user.login == 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop'
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.DEPENDABOT_TOKEN }}