T7644: mirror workflow refactoring rollout

This commit is contained in:
kumvijaya 2025-07-27 14:30:19 +05:30
parent 4f5de07491
commit fdd616fa32
4 changed files with 35 additions and 55 deletions

View File

@ -1,16 +0,0 @@
name: Cleanup pr mirror branch
on:
pull_request:
types: [closed]
branches:
- current
permissions:
contents: write
jobs:
call-delete-branch:
if: github.repository_owner != 'vyos'
uses: vyos/.github/.github/workflows/cleanup-mirror-pr-branch.yml@current
secrets: inherit

View File

@ -1,21 +0,0 @@
name: Create Mirror PR and Repo Sync
on:
workflow_dispatch:
inputs:
sync_branch:
description: 'branch to sync'
required: true
type: string
permissions:
pull-requests: write
contents: write
jobs:
call-mirror-pr-and-sync:
if: github.repository_owner != 'vyos'
uses: VyOS-Networks/vyos-reusable-workflows/.github/workflows/mirror-pr-and-sync.yml@main
with:
sync_branch: ${{ inputs.sync_branch }}
secrets:
PAT: ${{ secrets.PAT }}

View File

@ -0,0 +1,35 @@
name: PR Mirror and Repo Sync
on:
pull_request_target:
types: [closed]
branches: [current]
workflow_dispatch:
inputs:
sync_branch:
description: 'Branch to mirror'
required: true
default: 'current'
type: choice
options:
- current
permissions:
pull-requests: write
contents: write
issues: write
jobs:
call-pr-mirror-repo-sync:
if: |
github.repository_owner == 'vyos' &&
(
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request_target' && github.event.pull_request.merged == true)
)
uses: vyos/.github/.github/workflows/pr-mirror-repo-sync.yml@current
with:
sync_branch: ${{ github.event.inputs.sync_branch || 'current' }}
secrets:
PAT: ${{ secrets.PAT }}
REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}

View File

@ -1,18 +0,0 @@
name: Trigger Mirror PR and Repo Sync
on:
pull_request_target:
types:
- closed
branches:
- current
permissions:
pull-requests: write
contents: write
issues: write
jobs:
call-trigger-mirror-pr-repo-sync:
if: github.repository_owner == 'vyos' && github.event.pull_request.merged == true
uses: vyos/.github/.github/workflows/trigger-pr-mirror-repo-sync.yml@current
secrets: inherit