-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.38 KB
/
automerge.yml
File metadata and controls
50 lines (42 loc) · 1.38 KB
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
45
46
47
48
49
50
name: automerge
on:
pull_request:
branches: [main]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
jobs:
dependabot:
permissions:
contents: write
pull-requests: write
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- id: metadata
uses: dependabot/fetch-metadata@ffa630c65fa7e0ecfa0625b5ceda64399aea1b36 # v2
- name: log metadata
run: echo "${DEPENDABOT_METADATA}"
env:
DEPENDABOT_METADATA: ${{ toJson(steps.metadata.outputs) }}
- name: automerge
if: ${{ !contains(steps.metadata.outputs.update-type, 'major' ) }}
run: gh pr merge "${PR_NUMBER}" --auto --squash
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
pre-commit-ci:
permissions:
contents: write
pull-requests: write
if: ${{ github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
runs-on: ubuntu-latest
steps:
- name: automerge
run: gh pr merge "${PR_NUMBER}" --auto --squash
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}