This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
Merge stable PR on approval #19
Workflow file for this run
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
# This file is generated by `generate.sh`. | |
# Generated from https://github.com/bellroy/gha-workflows/tree/master/dhall/workflows/bellroy/pr-approve.dhall | |
# Think twice before editing it directly. | |
jobs: | |
merge-on-approval: | |
if: "github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'stable'" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Merge PR | |
run: | | |
PULL_ENDPOINT=${{ github.event.pull_request.url }} | |
echo $PULL_ENDPOINT | |
curl -sX PUT -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.ACTIONS_TOKEN }}" $PULL_ENDPOINT/merge -d '{ "merge_method" : "merge" }' | |
name: Merge stable PR on approval | |
on: | |
pull_request_review: | |
types: | |
- submitted |