Skip to content

Commit 6b3a726

Browse files
Onboard new backport-pr re-usable github workflow (opensearch-hadoop)
- 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 727416a commit 6b3a726

2 files changed

Lines changed: 6 additions & 50 deletions

File tree

.github/workflows/backport.yml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +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-
# Only react to merged PRs for security reasons.
11-
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
12-
if: >
13-
github.event.pull_request.merged
14-
&& (
15-
github.event.action == 'closed'
16-
|| (
17-
github.event.action == 'labeled'
18-
&& contains(github.event.label.name, 'backport')
19-
)
20-
)
21-
runs-on: ubuntu-latest
22-
permissions:
23-
contents: write
24-
pull-requests: write
25-
name: Backport
26-
steps:
27-
- name: GitHub App token
28-
id: github_app_token
29-
uses: tibdex/github-app-token@1901dc7d52169e70c27a8da37aef0d423e2867a2 # v1.5.0
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@c2d4cc919ef00608e9a6c66373d6bd62a2748153 # v2.1.0
37-
with:
38-
github_token: ${{ steps.github_app_token.outputs.token }}
39-
head_template: backport/backport-<%= number %>-to-<%= base %>
9+
if: github.repository == 'opensearch-project/opensearch-hadoop'
10+
uses: opensearch-project/opensearch-build/.github/workflows/backport-pr.yml@main
11+
secrets:
12+
OPENSEARCH_CI_BOT_TOKEN: ${{ secrets.OPENSEARCH_CI_BOT_TOKEN }}

.github/workflows/delete_backport_branch.yml

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

0 commit comments

Comments
 (0)