Add input (#1) #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |