diff options
-rw-r--r-- | .github/workflows/cleanup-mirror-pr-branch.yml | 1 | ||||
-rw-r--r-- | .github/workflows/mirror-pr-and-sync.yml | 26 | ||||
-rw-r--r-- | .github/workflows/repo-sync.yml | 17 | ||||
-rw-r--r-- | .github/workflows/trigger-pr-mirror-repo-sync.yml | 1 |
4 files changed, 28 insertions, 17 deletions
diff --git a/.github/workflows/cleanup-mirror-pr-branch.yml b/.github/workflows/cleanup-mirror-pr-branch.yml index bbe6aa2f..a62e44b2 100644 --- a/.github/workflows/cleanup-mirror-pr-branch.yml +++ b/.github/workflows/cleanup-mirror-pr-branch.yml @@ -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 diff --git a/.github/workflows/mirror-pr-and-sync.yml b/.github/workflows/mirror-pr-and-sync.yml new file mode 100644 index 00000000..48a67a43 --- /dev/null +++ b/.github/workflows/mirror-pr-and-sync.yml @@ -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 }} diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml deleted file mode 100644 index 6da2fb40..00000000 --- a/.github/workflows/repo-sync.yml +++ /dev/null @@ -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 }} diff --git a/.github/workflows/trigger-pr-mirror-repo-sync.yml b/.github/workflows/trigger-pr-mirror-repo-sync.yml index d5e8ce3b..f7489598 100644 --- a/.github/workflows/trigger-pr-mirror-repo-sync.yml +++ b/.github/workflows/trigger-pr-mirror-repo-sync.yml @@ -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 |