-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (38 loc) · 1.19 KB
/
merge_on_merge.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: Merge on merge
on:
# Don't use "pull_request" it won't have access to GITHUB_TOKEN on forks
pull_request_target:
push:
branches: [main]
permissions:
# Add contents write permission to allow commits
contents: write
# Add pull-requests write permission to allow commenting
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Need to specify ref for pull_request_target events
ref: ${{ github.event.pull_request.head.sha }}
- uses: narze/merge_on_merge@main
if: ${{ github.event_name == 'pull_request_target' }}
with:
mode: "preview"
input_path: "input"
base: "data.json"
merge_json_path: "path.to.entries"
output: "data.json"
processed_path: "processed"
repo: ${{ github.event.pull_request.repository.name }}
- uses: narze/merge_on_merge@main
if: ${{ github.event_name == 'push' }}
with:
mode: "commit"
input_path: "input"
base: "data.json"
merge_json_path: "path.to.entries"
output: "data.json"
processed_path: "processed"