From 9016f51a701853c326614c301746a9fbbdc7f5cf Mon Sep 17 00:00:00 2001
From: Pierre Delpy <p.delpy@dkfz-heidelberg.de>
Date: Tue, 27 Aug 2024 13:16:29 +0200
Subject: [PATCH] test backport main take 1

---
 .github/workflows/backport.yml | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 .github/workflows/backport.yml

diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml
new file mode 100644
index 0000000..4454269
--- /dev/null
+++ b/.github/workflows/backport.yml
@@ -0,0 +1,30 @@
+name: Backport to Feature Branch on PR Merge
+
+on:
+  pull_request:
+    types: [closed]
+    branches:
+      - test/backport-main
+
+jobs:
+  backport:
+    if: github.event.pull_request.merged == true
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout the repository
+        uses: actions/checkout@v3
+
+      - name: Set up Node.js
+        uses: actions/setup-node@v3
+        with:
+          node-version: '20'
+
+      - name: Backport changes from test/backport-main to test/backport-pilots
+        uses: backport-org/backport-github-action@v1
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          branches: 'test/backport-pilots'  # Specify your feature branch here
+          labels: 'backport'           # Optional: Add a label to the PR
+          assignees: 'PierreDelpy'  # Optional: Assign the PR to yourself or a team member
+          title: 'Automated Backport from test/backport-main to test/backport-pilots'
+          body: 'This PR automatically backports changes from the test/backport-main branch to the test/backport-pilots branch after a PR was merged into main.'
\ No newline at end of file