Skip to content

Commit

Permalink
Run backports on Merging onstead of PR synchronization
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 15, 2020
1 parent d062b6b commit 11f7393
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ name: Backport
# pull_request_target:
# types: [opened, closed, labeled, unlabeled, synchronize]
on:
pull_request_target:
types: [opened, closed, labeled, unlabeled, synchronize]
push:
branches:
- 'master'
- '[0-9].[0-9]+' # matches to backport branches, e.g. 3.6
tags: [ 'v*' ]
# pull_request_target:
# types: [opened, closed, labeled, unlabeled, synchronize]

jobs:
backport:
Expand All @@ -13,11 +18,11 @@ jobs:
# not awailable for forks, skip the workflow
# if: ${{ github.event.pull_request.head.repo.full_name == 'aio-libs/aiohttp' }}
steps:
# - id: generate_token
# uses: tibdex/github-app-token@v1
# with:
# app_id: ${{ secrets.BOT_APP_ID }}
# private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Backport
uses: sqren/backport-github-action@v1
with:
Expand All @@ -43,7 +48,7 @@ jobs:

# Optional
# If no labels match the `backport_label_pattern` the backport check will fail. To bypass this for a single PR you can add a label to indicate the PR should not be backported
# skip_backport_check_label: 'backport:skip'
skip_backport_check_label: 'backport:skip'

# Optional
# If no labels match the `backport_label_pattern` the backport check will fail. Enabling this will bypass the check for all PRs
Expand Down

0 comments on commit 11f7393

Please sign in to comment.