Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 0a3c306

Browse files
authored
Merge pull request #50 from kumvijaya/current
T7613: pr mirror workflow manual run option added with closed choice
2 parents 08ac48b + cb7336c commit 0a3c306

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed
Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
name: PR Mirror and Repo Sync
2+
23
on:
34
pull_request_target:
4-
types:
5-
- closed
6-
branches:
7-
- current
5+
types: [closed]
6+
branches: [current]
87
workflow_dispatch:
98
inputs:
109
sync_branch:
11-
description: 'branch to sync'
12-
required: false
13-
type: string
10+
description: 'Branch to mirror'
11+
required: true
1412
default: 'current'
13+
type: choice
14+
options:
15+
- current
16+
1517
permissions:
1618
pull-requests: write
1719
contents: write
1820
issues: write
21+
1922
jobs:
20-
call-mirror-pr-repo-sync:
21-
if: github.repository_owner == 'vyos' && github.event.pull_request.merged == true
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+
)
2230
uses: vyos/.github/.github/workflows/pr-mirror-repo-sync.yml@current
2331
with:
24-
sync_branch: ${{ inputs.sync_branch }}
32+
sync_branch: ${{ github.event.inputs.sync_branch || 'current' }}
2533
secrets:
2634
PAT: ${{ secrets.PAT }}
2735
REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}
28-
REMOTE_REPO: ${{ secrets.REMOTE_REPO }}
36+
REMOTE_REPO: ${{ secrets.REMOTE_REPO }}

0 commit comments

Comments
 (0)