Browse Source

add deploy trigger gha

Daniel Bohry 6 days ago
parent
commit
18c25bb6c8
1 changed files with 11 additions and 0 deletions
  1. 11 0
      .github/workflows/buildAndRelease.yml

+ 11 - 0
.github/workflows/buildAndRelease.yml

@@ -3,6 +3,13 @@ name: Release
 on:
   push:
     branches: [ main ]
+  workflow_dispatch:
+    inputs:
+      branch:
+        description: 'Branch to build'
+        required: true
+        default: 'main'
+        type: string
 
 jobs:
   build-and-test:
@@ -10,6 +17,8 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v3
+        with:
+          ref: ${{ github.event.inputs.branch || github.ref }}
       - name: Set up JDK
         uses: actions/setup-java@v3
         with:
@@ -24,6 +33,8 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v3
+        with:
+          ref: ${{ github.event.inputs.branch || github.ref }}
       - name: Set up JDK
         uses: actions/setup-java@v3
         with: