فهرست منبع

Merge pull request #3114 from gravitl/NET-1518

manual trigger of workflow
Abhishek K 1 سال پیش
والد
کامیت
b13f4be5e9
1فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 6 1
      .github/workflows/branchtest.yml

+ 6 - 1
.github/workflows/branchtest.yml

@@ -3,7 +3,7 @@ name: Deploy and Test Branch
 on:
   workflow_dispatch:
     inputs:
-      branches:
+      branch:
         description: 'Branch to deploy and test'
         required: true
         default: 'develop'
@@ -37,6 +37,11 @@ jobs:
       - name: check if branch exists
         id: getbranch 
         run: |
+          if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
+            BRANCH="${{ github.event.inputs.branch }}"
+          else
+            BRANCH="${{ github.head_ref }}"
+          fi
           if git show-ref ${{ github.head_ref}}; then
             echo branch exists
             echo "netclientbranch=${{ github.head_ref }}" >> $GITHUB_OUTPUT