Skip to content

Commit d751342

Browse files
authored
Merge pull request #22 from vyos/T8365-enable-pr-mirror
T8365: enabled PR mirror
2 parents 3ac661e + a8c4094 commit d751342

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: PR Mirror and Repo Sync
2+
3+
on:
4+
pull_request_target:
5+
types: [closed]
6+
branches: [current]
7+
workflow_dispatch:
8+
inputs:
9+
sync_branch:
10+
description: 'Branch to mirror'
11+
required: true
12+
default: 'current'
13+
type: choice
14+
options:
15+
- current
16+
17+
permissions:
18+
pull-requests: write
19+
contents: write
20+
issues: write
21+
22+
jobs:
23+
call-pr-mirror-repo-sync:
24+
if: |
25+
github.repository_owner == 'vyos' &&
26+
(
27+
github.event_name == 'workflow_dispatch' ||
28+
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)
29+
)
30+
uses: vyos/.github/.github/workflows/pr-mirror-repo-sync.yml@current
31+
with:
32+
sync_branch: ${{ github.event.inputs.sync_branch || 'current' }}
33+
secrets:
34+
PAT: ${{ secrets.PAT }}
35+
REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}

0 commit comments

Comments
 (0)