CI: Add gh2gerrit workflow 64/73264/1 master
authorAnil Belur <abelur@linuxfoundation.org>
Wed, 4 Sep 2024 00:18:47 +0000 (10:18 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 24 Oct 2024 02:53:00 +0000 (12:53 +1000)
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: I7198c1089aa37322f0d3b9ad8004da6c20637da0

.github/workflows/call-github2gerrit.yaml [new file with mode: 0644]

diff --git a/.github/workflows/call-github2gerrit.yaml b/.github/workflows/call-github2gerrit.yaml
new file mode 100644 (file)
index 0000000..e79d36e
--- /dev/null
@@ -0,0 +1,33 @@
+---
+# SPDX-License-Identifier: Apache-2.0
+# Copyright 2024 The Linux Foundation <abelur@linux.com>
+
+name: call-github2gerrit-reusable-workflow
+
+# yamllint disable-line rule:truthy
+on:
+  workflow_dispatch:
+  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
+    uses: lfit/github2gerrit/.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 }}
+      ORGANIZATION: ${{ vars.ORGANIZATION }}
+    secrets:
+      GERRIT_SSH_PRIVKEY_G2G: ${{ secrets.GERRIT_SSH_PRIVKEY_G2G }}