Skip to content

Commit f7330bf

Browse files
Onboard new backport-pr re-usable github workflow (flow-framework) (#1428)
- Replace old backport workflow with reusable workflow from opensearch-build - Remove obsolete backport-related workflows Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent bda35e6 commit f7330bf

2 files changed

Lines changed: 6 additions & 48 deletions

File tree

.github/workflows/add-backport-label.yml.disabled

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/backport.yml

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,12 @@
1+
---
12
name: Backport
23
on:
34
pull_request_target:
4-
types:
5-
- closed
6-
- labeled
5+
types: [closed, labeled]
76

87
jobs:
98
backport:
10-
name: Backport
11-
runs-on: ubuntu-latest
12-
# Only react to merged PRs for security reasons.
13-
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
14-
if: >
15-
github.event.pull_request.merged
16-
&& (
17-
github.event.action == 'closed'
18-
|| (
19-
github.event.action == 'labeled'
20-
&& contains(github.event.label.name, 'backport')
21-
)
22-
)
23-
permissions:
24-
contents: write
25-
pull-requests: write
26-
steps:
27-
- name: GitHub App token
28-
id: github_app_token
29-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
30-
with:
31-
app_id: ${{ secrets.APP_ID }}
32-
private_key: ${{ secrets.APP_PRIVATE_KEY }}
33-
installation_id: 22958780
34-
35-
- name: Backport
36-
uses: VachaShah/backport@142d3b8a8c70dc54db515e653e5ed3c3fac64100 # v2.2.0
37-
with:
38-
github_token: ${{ steps.github_app_token.outputs.token }}
39-
head_template: backport/backport-<%= number %>-to-<%= base %>
40-
failure_labels: backport-failed
9+
if: github.repository == 'opensearch-project/flow-framework'
10+
uses: opensearch-project/opensearch-build/.github/workflows/backport-pr.yml@main
11+
secrets:
12+
OPENSEARCH_CI_BOT_TOKEN: ${{ secrets.OPENSEARCH_CI_BOT_TOKEN }}

0 commit comments

Comments
 (0)