-
Notifications
You must be signed in to change notification settings - Fork 713
68 lines (61 loc) · 2.15 KB
/
github2gerrit.yaml
File metadata and controls
68 lines (61 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025 The Linux Foundation
name: 'GitHub2Gerrit'
# 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
allow_duplicates:
description: "Allow duplicate changes to be raised in Gerrit"
required: false
default: false
type: boolean
pull_request_target:
types: [opened, reopened, edited, synchronize]
branches:
- master
- main
concurrency:
group: "${{ github.workflow }}-${{ github.run_id }}"
cancel-in-progress: true
jobs:
github2gerrit:
name: 'GitHub2Gerrit'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
timeout-minutes: 12
steps:
# Harden the runner used by this workflow
# yamllint disable-line rule:line-length
- uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
name: 'Harden runner'
with:
egress-policy: audit
- name: 'Checkout repository'
# yamllint disable-line rule:line-length
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # v6.0.2
with:
fetch-depth: 10
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: 'Run GitHub2Gerrit Action'
# yamllint disable-line rule:line-length
uses: lfreleng-actions/github2gerrit-action@7c1ba15a75dd86619139a81933f4432648d97af5 # v1.0.5
with:
USE_PR_AS_COMMIT: true
ALLOW_DUPLICATES: ${{ inputs.allow_duplicates }}
PRESERVE_GITHUB_PRS: ${{ inputs.preserve_github_prs }}
ISSUE_ID_LOOKUP_JSON: ${{ vars.ISSUE_ID_LOOKUP_JSON }}
GERRIT_SSH_PRIVKEY_G2G: ${{ secrets.GERRIT_SSH_PRIVKEY_G2G }}
GERRIT_SSH_USER_G2G: ${{ vars.GERRIT_SSH_USER_G2G }}
GERRIT_SSH_USER_G2G_EMAIL: ${{ vars.GERRIT_SSH_USER_G2G_EMAIL }}
GERRIT_KNOWN_HOSTS: ${{ vars.GERRIT_KNOWN_HOSTS }}
VERBOSE: true