mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
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:
parent
ae3a66c3f3
commit
48fb37eca3
@ -11,5 +11,6 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-delete-branch:
|
call-delete-branch:
|
||||||
|
if: github.repository_owner != 'vyos'
|
||||||
uses: vyos/.github/.github/workflows/cleanup-mirror-pr-branch.yml@current
|
uses: vyos/.github/.github/workflows/cleanup-mirror-pr-branch.yml@current
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
26
.github/workflows/mirror-pr-and-sync.yml
vendored
Normal file
26
.github/workflows/mirror-pr-and-sync.yml
vendored
Normal 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 }}
|
||||||
17
.github/workflows/repo-sync.yml
vendored
17
.github/workflows/repo-sync.yml
vendored
@ -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 }}
|
|
||||||
@ -8,5 +8,6 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-trigger-mirror-pr-repo-sync:
|
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
|
uses: vyos/.github/.github/workflows/trigger-pr-mirror-repo-sync.yml@current
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user