summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorVijayakumar A <36878324+kumvijaya@users.noreply.github.com>2024-07-13 19:21:16 +0530
committerGitHub <noreply@github.com>2024-07-13 19:21:16 +0530
commit526f061dead95546e9bfc1ef4bf1a903f8a88ef4 (patch)
treeba5655b3118be75fd5fd83e6512e58abd14136f6 /.github
parentb8bb82540eb4cfef19e21f8ef9fd3f636cf0d13b (diff)
downloadvyos-1x-526f061dead95546e9bfc1ef4bf1a903f8a88ef4.tar.gz
vyos-1x-526f061dead95546e9bfc1ef4bf1a903f8a88ef4.zip
T6572: added trigger workflow caller workflow
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/trigger-pr.yml34
1 files changed, 16 insertions, 18 deletions
diff --git a/.github/workflows/trigger-pr.yml b/.github/workflows/trigger-pr.yml
index 41347eacf..0e28b460f 100644
--- a/.github/workflows/trigger-pr.yml
+++ b/.github/workflows/trigger-pr.yml
@@ -1,21 +1,19 @@
name: Trigger PR
+
on:
- pull_request_target:
- types:
- - closed
- branches:
- - current
-
+ pull_request_target:
+ types:
+ - closed
+ branches:
+ - current
+
jobs:
- trigger-repo-sync:
- if: github.event.pull_request.merged == true
- runs-on: ubuntu-latest
- steps:
- - name: Trigger PR
- shell: bash
- run: |
- curl -X POST \
- -H "Accept: application/vnd.github.everest-preview+json" \
- -H "Authorization: Bearer ${{ secrets.PAT }}" \
- https://api.github.com/repos/${{ secrets.REMOTE_OWNER }}/${{ secrets.REMOTE_REPO }}/actions/workflows/create-pr.yml/dispatches \
- -d '{"ref": "git-actions", "inputs":{"pr_number":"${{ github.event.pull_request.number }}", "pr_source_branch": "current", "pr_target_branch": "circinus", "pr_message":"${{ github.event.pull_request.title }}", "pr_source_repo":"${{ github.repository }}" }}'
+ trigger-PR:
+ uses: vyos/.github/.github/workflows/trigger-pr.yml@current
+ with:
+ source_branch: 'current'
+ target_branch: 'circinus'
+ secrets:
+ REMOTE_REPO: ${{ secrets.REMOTE_REPO }}
+ REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}
+ PAT: ${{ secrets.PAT }}