-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allow for easier backport of PRs to existing releases. Signed-off-by: Vinicius Aquino <vinicius.aquino@ossystems.com.br>
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Backport labeled merged pull requests | ||
on: | ||
pull_request_target: | ||
types: [closed] | ||
issue_comment: | ||
types: [created] | ||
jobs: | ||
build: | ||
name: Create backport PRs | ||
runs-on: ubuntu-latest | ||
# Only run when pull request is merged | ||
# or when a comment containing `/backport` is created | ||
if: > | ||
( | ||
github.event_name == 'pull_request_target' && | ||
github.event.pull_request_target.merged | ||
) || ( | ||
github.event_name == 'issue_comment' && | ||
github.event.issue.pull_request_target && | ||
contains(github.event.comment.body, '/backport') | ||
) | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Required to find all branches | ||
fetch-depth: 0 | ||
- name: Create backport PRs | ||
# Should be kept in sync with `version` | ||
uses: zeebe-io/backport-action@v0.0.4 | ||
with: | ||
# Required | ||
# Version of the backport-action | ||
# Must equal the version in `uses` | ||
# Recommended: latest tag or `master` | ||
version: v0.0.4 | ||
|
||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_workspace: ${{ github.workspace }} |