Skip to content

Commit

Permalink
Change backport tool
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinmo committed Dec 14, 2024
1 parent 81fd27a commit bbe940a
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
name: Pull Request Backporting using Git Backporting
name: Automatic backport pull requests

on:
workflow_dispatch:
inputs:
targetBranch:
description: 'Target branch'
required: true
type: string
pullRequest:
description: 'Pull request url'
required: true
type: string
dryRun:
description: 'Dry run'
required: false
default: "true"
type: string
on:
pull_request_target:
types:
- labeled
- closed

jobs:
backporting:
name: "Backporting"
backport:
name: Create backport pull requests
if: github.event.pull_request.merged == true && !(contains(github.event.pull_request.labels.*.name, 'backport'))
runs-on: ubuntu-latest
steps:
- name: Backporting
uses: kiegroup/git-backporting@v4
uses: sorenlouv/backport-github-action@v9.5.1
with:
target-branch: ${{ inputs.targetBranch }}
pull-request: ${{ inputs.pullRequest }}
auth: ${{ secrets.GITHUB_TOKEN }}
dry-run: ${{ inputs.dryRun }}
# github_token requires the following permissions
# repo or public_repo
# workflow
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_backport_label_prefix: backport-to-

- name: Log output on success
if: ${{ success() }}
run: cat ~/.backport/backport.info.log

- name: Log output on failure
if: ${{ failure() }}
run: cat ~/.backport/backport.debug.log

0 comments on commit bbe940a

Please sign in to comment.