From: Matthew Watkins Date: Fri, 22 Aug 2025 12:13:01 +0000 (+0100) Subject: Feat: Add initial workflow for github2gerrit-python testing X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=3f1cc520d154bf47b437fe83a37879e207b9eee1;p=portal-ng%2Fbff.git Feat: Add initial workflow for github2gerrit-python testing Issue-ID: CIMAN-33 This workflow will allow us to test alongside the legacy github2gerrit. Change-Id: Idbf6d4fef83269d210f009c636fef8736120c3f2 Signed-off-by: Matthew Watkins --- diff --git a/.github/workflows/github2gerrit-python.yaml b/.github/workflows/github2gerrit-python.yaml new file mode 100644 index 0000000..2ad303e --- /dev/null +++ b/.github/workflows/github2gerrit-python.yaml @@ -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 }}