-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
31 lines (27 loc) · 834 Bytes
/
.gitlab-ci.yml
File metadata and controls
31 lines (27 loc) · 834 Bytes
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
# GitLab CI configuration for GitHub PR mirroring
# This pipeline is manually triggered to create MRs from GitHub PRs for internal testing
#
# Required CI/CD Variable:
# GITLAB_TOKEN - Personal/Project Access Token with 'write_repository' scope
# Configure at: Settings > CI/CD > Variables (Protected + Masked)
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
when: always
- when: never
variables:
GITHUB_PR_NUMBER:
description: "GitHub PR number to mirror"
GITHUB_COMMIT_SHA:
description: "GitHub commit SHA to fetch"
stages:
- mirror
mirror-github-pr:
stage: mirror
image: images.paas.redhat.com/it-cloud-ocp-proxy-lib/python:3.14
tags:
- rhel-lightspeed
script:
- python3 scripts/mirror_github_pr.py
rules:
- if: $GITHUB_PR_NUMBER && $GITHUB_COMMIT_SHA