-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (39 loc) · 1.25 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
41
42
43
44
name: Pull Requests
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, edited, synchronize]
permissions:
contents: write
pull-requests: write
jobs:
run_checks:
name: Run code checks
uses: spuxx-dev/ci-cd/.github/workflows/pnpm_run_checks.yml@v4.1.0
with:
PREPARE: pnpm -r --filter './packages/**' build
run_unit_tests:
name: Run tests (vitest)
uses: spuxx-dev/ci-cd/.github/workflows/pnpm_run_tests_vitest.yml@v4.1.0
with:
PREPARE: pnpm -r --filter './packages/**' build
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
needs:
- run_checks
- run_unit_tests
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: |
steps.metadata.outputs.update-type == 'version-update:semver-minor' ||
steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}