Skip to content

Commit d3711ff

Browse files
Julian Alejandro Albarellosanaiberta
andauthored
Add public mirror sync workflow (#976)
* Add public mirror sync workflow and update CODEOWNERS * Remove CODEOWNERS for .github directory Removed CODEOWNERS entry for the .github directory. --------- Co-authored-by: Ana Isabel Berta Mullin <ana.berta@globant.com>
1 parent 6e06a1e commit d3711ff

2 files changed

Lines changed: 52 additions & 1 deletion

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/.github/ @genexuslabs/workflow-codeowners
1+
.github/workflows/public-mirror-*.yml @VY-GEN032-KG/mirror-codeowners
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# ------------------------------------------------------------------------------
2+
# DO NOT MODIFY — This workflow is part of the public mirror infrastructure
3+
# and is managed by the repository maintainers. Pull requests that modify
4+
# this file will not be accepted.
5+
# ------------------------------------------------------------------------------
6+
name: Public mirror — push
7+
8+
on:
9+
push:
10+
branches:
11+
# Customize to match this repository's branch structure.
12+
- master
13+
- 'release-*'
14+
workflow_dispatch:
15+
repository_dispatch:
16+
types: [public-pr-intake]
17+
pull_request:
18+
types: [closed]
19+
20+
permissions:
21+
contents: write
22+
pull-requests: write
23+
24+
jobs:
25+
26+
sync:
27+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
28+
uses: VY-GEN032-KG/.github/.github/workflows/public-mirror-sync-reusable.yml@main
29+
secrets: inherit
30+
31+
ingest:
32+
if: ${{ github.event_name == 'repository_dispatch' }}
33+
uses: VY-GEN032-KG/.github/.github/workflows/public-mirror-ingest-pr-reusable.yml@main
34+
with:
35+
public_pr_number: ${{ github.event.client_payload.public_pr_number }}
36+
base_ref: ${{ github.event.client_payload.base_ref }}
37+
pr_title: ${{ github.event.client_payload.title }}
38+
pr_author: ${{ github.event.client_payload.author }}
39+
pr_url: ${{ github.event.client_payload.url }}
40+
pr_action: ${{ github.event.client_payload.action }}
41+
secrets: inherit
42+
43+
close-mirror:
44+
if: ${{ github.event_name == 'pull_request' &&
45+
contains(toJSON(github.event.pull_request.labels.*.name), 'mirror:pub-') }}
46+
uses: VY-GEN032-KG/.github/.github/workflows/public-mirror-close-pr-reusable.yml@main
47+
with:
48+
labels_json: ${{ toJSON(github.event.pull_request.labels) }}
49+
base_ref: ${{ github.event.pull_request.base.ref }}
50+
merged: ${{ toJSON(github.event.pull_request.merged) }}
51+
secrets: inherit

0 commit comments

Comments
 (0)