-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (57 loc) · 1.95 KB
/
Copy pathgithub2gerrit.yaml
File metadata and controls
64 lines (57 loc) · 1.95 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
---
# 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
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:
- main
concurrency:
group: "${{ github.workflow }}-${{ github.run_id }}"
cancel-in-progress: true
jobs:
github2gerrit:
name: 'GitHub2Gerrit Python'
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@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
name: 'Harden runner'
with:
egress-policy: audit
- name: 'Checkout repository'
# yamllint disable-line rule:line-length
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
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@cf7b6472cdbe26400ee2cda48c0c68d43c5244a3 # v1.0.2
with:
USE_PR_AS_COMMIT: true
ALLOW_DUPLICATES: ${{ inputs.allow_duplicates }}
PRESERVE_GITHUB_PRS: ${{ inputs.preserve_github_prs }}
GERRIT_SSH_PRIVKEY_G2G: ${{ secrets.GERRIT_SSH_PRIVKEY_G2G }}
GERRIT_KNOWN_HOSTS: ${{ vars.GERRIT_KNOWN_HOSTS }}
VERBOSE: true