Skip to content

Commit 3d29d58

Browse files
committed
Add label check
1 parent 3d3e8a5 commit 3d29d58

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/backport.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,21 @@ jobs:
1212
if: github.event.pull_request.merged == true && !(contains(github.event.pull_request.labels.*.name, 'backport'))
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Check labels for prefix
16+
id: preview_label_check
17+
uses: docker://agilepathway/pull-request-label-checker:v1.6.55
18+
with:
19+
allow_failure: true
20+
prefix_mode: true
21+
one_of: backport-to-
22+
repo_token: ${{ secrets.BACKPORT_TOKEN }}
23+
1524
- name: Backporting
1625
uses: sorenlouv/backport-github-action@v9.5.1
26+
if: steps.preview_label_check.outputs.label_check == 'success'
1727
with:
1828
# github_token requires a token that has write permissions to the following:
1929
# Contents, Pull Requests, Workflows
2030
github_token: ${{ secrets.BACKPORT_TOKEN }}
2131
auto_backport_label_prefix: backport-to-
2232

23-
- name: Log output on success
24-
if: ${{ success() }}
25-
run: cat ~/.backport/backport.info.log
26-
27-
- name: Log output on failure
28-
if: ${{ failure() }}
29-
run: cat ~/.backport/backport.debug.log

0 commit comments

Comments
 (0)