-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (34 loc) · 1.07 KB
/
pr-metadata.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
name: PR / Metadata
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened, edited]
permissions:
pull-requests: write
contents: write
jobs:
validate-metadata:
name: Validate metadata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
cache: yarn
- run: yarn install --frozen-lockfile
- name: Run yarn commitlint --from=pull_request.title
run: echo "${{ github.event.pull_request.title }}" | yarn commitlint
auto-merge:
name: Auto-merge
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: dependabot/[email protected]
id: dependabot-metadata
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}