Skip to content

Commit a06c5ba

Browse files
Onboard new backport-pr re-usable github workflow (opensearch-dashboards-test-library)
- 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 a477516 commit a06c5ba

2 files changed

Lines changed: 6 additions & 52 deletions

File tree

.github/workflows/backport.yml

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +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-
runs-on: ubuntu-latest
11-
permissions:
12-
contents: write
13-
pull-requests: write
14-
name: Backport
15-
# Only react to merged PRs for security reasons.
16-
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
17-
if: >
18-
github.event.pull_request.merged
19-
&& (
20-
github.event.action == 'closed'
21-
|| (
22-
github.event.action == 'labeled'
23-
&& contains(github.event.label.name, 'backport')
24-
)
25-
)
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-
# opensearch-trigger-bot installation ID
34-
installation_id: 22958780
35-
36-
- name: Backport
37-
uses: VachaShah/backport@142d3b8a8c70dc54db515e653e5ed3c3fac64100 # v2.2.0
38-
with:
39-
github_token: ${{ steps.github_app_token.outputs.token }}
40-
head_template: backport/backport-<%= number %>-to-<%= base %>
41-
files_to_skip: "CHANGELOG.md"
42-
labels_template: "<%= JSON.stringify([...labels, 'autocut']) %>"
43-
failure_labels: "failed backport"
9+
if: github.repository == 'opensearch-project/opensearch-dashboards-test-library'
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 & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)