mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
T7644: mirror workflow refactoring rollout
This commit is contained in:
parent
4f5de07491
commit
fdd616fa32
16
.github/workflows/cleanup-mirror-pr-branch.yml
vendored
16
.github/workflows/cleanup-mirror-pr-branch.yml
vendored
@ -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
|
||||
21
.github/workflows/mirror-pr-and-sync.yml
vendored
21
.github/workflows/mirror-pr-and-sync.yml
vendored
@ -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 }}
|
||||
35
.github/workflows/pr-mirror-repo-sync.yml
vendored
Normal file
35
.github/workflows/pr-mirror-repo-sync.yml
vendored
Normal 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 }}
|
||||
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user