Skip to content

Commit

Permalink
switch action
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Feb 9, 2024
1 parent f973c08 commit ee8bd77
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,34 @@ name: backport pr

on:
pull_request:
types: [labeled, closed]
types: [closed]
issue_comment:
types: [created]

jobs:
backport:
if: |
github.repository_owner == 'edgelesssys' &&
github.event.pull_request.merged == true &&
(github.event_name != 'labeled' || startsWith('backport', github.event.label.name))
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/backport')
)
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
steps:
- name: Backport Action
uses: sorenlouv/backport-github-action@f7073a2287aefc1fa12685eb25a712ab5620445c # v9.3.1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Create backport PRs
uses: korthout/backport-action@e8161d6a0dbfa2651b7daa76cbb75bc7c925bbf3 # v2.4.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_backport_label_prefix: "backport to "
- name: Info log
if: success()
run: |
cat ~/.backport/backport.info.log
- name: Debug log
if: failure()
run: |
cat ~/.backport/backport.debug.log
copy_milestone: true
pull_title: '[${target_branch}] ${pull_title}'
github_token: ${{ secrets.NUNKI_CI_COMMIT_PUSH_PR }}
experimental: |
{
"detect_merge_method": true
}

0 comments on commit ee8bd77

Please sign in to comment.