Feat: Add GitHub2Gerrit and Dependabot workflows 92/14792/2
authorMatthew Watkins <mwatkins@linuxfoundation.org>
Tue, 5 Aug 2025 20:20:24 +0000 (21:20 +0100)
committerMatthew Watkins <mwatkins@linuxfoundation.org>
Tue, 5 Aug 2025 20:20:50 +0000 (21:20 +0100)
Required for: IT-27939

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

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644 (file)
index 0000000..50f6825
--- /dev/null
@@ -0,0 +1,11 @@
+---
+# Dependabot configured for weekly NPM and Docker scans
+
+version: 2
+updates:
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      interval: "weekly"
+    commit-message:
+      prefix: "Chore"
diff --git a/.github/workflows/github2gerrit.yaml b/.github/workflows/github2gerrit.yaml
new file mode 100644 (file)
index 0000000..75a527f
--- /dev/null
@@ -0,0 +1,34 @@
+---
+# SPDX-License-Identifier: Apache-2.0
+# Copyright 2025 The Linux Foundation <mwatkins@linuxfoundation.org>
+
+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
+        # yamllint disable-line rule:line-length
+        uses: lfit/github2gerrit/.github/workflows/github2gerrit.yaml@1daf48c1a86add1aaac7695f44f8c1b6b142f49f # v0.2
+        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: ${{ github.repository_owner }}
+        secrets:
+            GERRIT_SSH_PRIVKEY_G2G: ${{ secrets.GERRIT_SSH_PRIVKEY_G2G }}