Accept Release Candidate #1
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: Accept Release Candidate | ||
on: | ||
pull_request_review: | ||
types: [submitted] | ||
jobs: | ||
merge: | ||
name: Merge Release Candidate | ||
if: > | ||
Check failure on line 10 in .github/workflows/accept_release_candidate.yml GitHub Actions / Accept Release CandidateInvalid workflow file
|
||
github.event.review.state == 'approved' && | ||
contains(steps.ref_from_sha.outputs.branch_name, "rc") | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Merge pull request" | ||
uses: "actions/github-script@v5" | ||
with: | ||
script: | | ||
const pullRequest = context.payload.workflow_run.pull_requests[0] | ||
const repository = context.repo | ||
await github.rest.pulls.merge({ | ||
merge_method: "merge", | ||
owner: repository.owner, | ||
pull_number: pullRequest.number, | ||
repo: repository.repo, | ||
}) |