Feat: Add initial workflow for github2gerrit-python testing 93/141893/2
authorMatthew Watkins <mwatkins@linuxfoundation.org>
Fri, 22 Aug 2025 12:13:01 +0000 (13:13 +0100)
committerMatthew Watkins <mwatkins@linuxfoundation.org>
Fri, 22 Aug 2025 12:16:04 +0000 (13:16 +0100)
Issue-ID: CIMAN-33

This workflow will allow us to test alongside the legacy github2gerrit.

Change-Id: Idbf6d4fef83269d210f009c636fef8736120c3f2
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
.github/workflows/github2gerrit-python.yaml [new file with mode: 0644]

diff --git a/.github/workflows/github2gerrit-python.yaml b/.github/workflows/github2gerrit-python.yaml
new file mode 100644 (file)
index 0000000..2ad303e
--- /dev/null
@@ -0,0 +1,41 @@
+---
+# SPDX-License-Identifier: Apache-2.0
+# SPDX-FileCopyrightText: 2025 The Linux Foundation
+
+name: github2gerrit-python
+
+# yamllint disable-line rule:truthy
+on:
+    workflow_dispatch:
+    inputs:
+      preserve_github_prs:
+        description: "Do not close GitHub PRs after pushing to Gerrit"
+        required: false
+        default: false
+        type: boolean
+    pull_request_target:
+        types: [opened, reopened, edited, synchronize]
+        branches:
+            - master
+            - main
+
+concurrency:
+    # yamllint disable-line rule:line-length
+    group: ${{ github.workflow }}-${{ github.run_id }}
+    cancel-in-progress: true
+
+jobs:
+    call-in-g2g-workflow:
+        permissions:
+            contents: read
+            pull-requests: write
+        # yamllint disable rule:line-length
+        uses: ModeSevenIndustrialSolutions/github2gerrit-python/.github/workflows/github2gerrit.yaml@main
+        with:
+            GERRIT_KNOWN_HOSTS: ${{ vars.GERRIT_KNOWN_HOSTS }}
+            GERRIT_SSH_USER_G2G: ${{ vars.GERRIT_SSH_USER_G2G }}
+            GERRIT_SSH_USER_G2G_EMAIL: ${{ vars.GERRIT_SSH_USER_G2G_EMAIL }}
+            USE_PR_AS_COMMIT: true
+            PRESERVE_GITHUB_PRS: true
+        secrets:
+            GERRIT_SSH_PRIVKEY_G2G: ${{ secrets.GERRIT_SSH_PRIVKEY_G2G }}