Skip to content

Commit

Permalink
#131 using delayed merge action (#167)
Browse files Browse the repository at this point in the history
this should now merge the PR after a delay of 300 seconds, which should be more than enough for the actions to pass successfully
  • Loading branch information
vaadin-miki authored Jun 21, 2020
1 parent 89c6bd3 commit 47f03a6
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/releasebranch.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: Merge release notes, create release branch

on:
check_suite:
types: [completed]
pull_request:
types: [opened]

jobs:
make-release-branch:
runs-on: ubuntu-latest
if: ${{ github.event.check_suite[conclusion] == 'success' && startsWith(github.event.check_suite[head_branch], 'notes-') }}
if: ${{ startsWith(github.event.pull_request.title, 'Release notes for version') && startsWith(github.event.pull_request.head.ref, 'notes-') }}
timeout-minutes: 30
steps:
- id: version
run: |
set -x
echo "::set-output name=version::`echo '${{ github.event.pull_request.head.ref }}' | cut -d'-' -f2`"
- name: Merge PR
uses: UnforgivenPL/merge-pr@v1
uses: UnforgivenPL/merge-pr@v2
with:
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
pr: ${{ github.event.check_suite[pull_requests][0].number }}
pr: ${{ github.event.number }}
delay: 300
must-have-labels: release
- name: Create release branch
uses: UnforgivenPL/push-branch@v2
Expand Down

0 comments on commit 47f03a6

Please sign in to comment.