T7172: added workflow checks to make current as default in private repo (#910)

* T7172: added workflow checks to making current as default in private repo

---------

Co-authored-by: kumvijaya <kuvmijaya@gmail.com>
This commit is contained in:
Vijayakumar A 2025-02-17 00:31:35 +05:30 committed by GitHub
parent ae3a66c3f3
commit 48fb37eca3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 17 deletions

View File

@ -11,5 +11,6 @@ permissions:
jobs:
call-delete-branch:
if: github.repository_owner != 'vyos'
uses: vyos/.github/.github/workflows/cleanup-mirror-pr-branch.yml@current
secrets: inherit

View File

@ -0,0 +1,26 @@
name: Create Mirror PR and Repo Sync
on:
workflow_dispatch:
inputs:
pr_number:
description: 'Source repo PR Number'
required: true
type: string
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:
pr_number: ${{ inputs.pr_number }}
sync_branch: ${{ inputs.sync_branch }}
secrets:
PAT: ${{ secrets.PAT }}

View File

@ -1,17 +0,0 @@
name: Repo-sync
on:
pull_request_target:
types:
- closed
branches:
- current
workflow_dispatch:
jobs:
trigger-sync:
uses: vyos/.github/.github/workflows/trigger-repo-sync.yml@current
secrets:
REMOTE_REPO: ${{ secrets.REMOTE_REPO }}
REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}
PAT: ${{ secrets.PAT }}

View File

@ -8,5 +8,6 @@ on:
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