Skip to content

Commit

Permalink
cicd: Add backport workflow
Browse files Browse the repository at this point in the history
This allow for easier backport of PRs to existing releases.

Signed-off-by: Vinicius Aquino <vinicius.aquino@ossystems.com.br>
  • Loading branch information
Ossanes authored and otavio committed Jul 7, 2021
1 parent 55411ed commit a68630d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/backport.yaml
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 }}

0 comments on commit a68630d

Please sign in to comment.