From 37b5d924dd7e682d14d211aae50dbf6fac45bc15 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Wed, 11 Dec 2024 11:57:53 +1000 Subject: [PATCH] CI: Enable Github2Gerrit workflow This allows Github devs/users to contribute to the repo using the Github workflow. Change-Id: I3165611aaa51fc5f5229a1277c125c0d2eeacce0 Signed-off-by: Anil Belur --- .github/workflows/github2gerrit.yaml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/github2gerrit.yaml diff --git a/.github/workflows/github2gerrit.yaml b/.github/workflows/github2gerrit.yaml new file mode 100644 index 000000000..8e37a2843 --- /dev/null +++ b/.github/workflows/github2gerrit.yaml @@ -0,0 +1,32 @@ +--- +# SPDX-License-Identifier: Apache-2.0 +# Copyright 2024 The Linux Foundation + +name: call-github2gerrit-reusable-workflow + +# yamllint disable-line rule:truthy +on: + workflow_dispatch: + pull_request_target: + types: [opened, reopened, edited, synchronize] + branches: + - master + +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 }}