Skip to content

Commit c7cbfd7

Browse files
authored
Update main.yml
1 parent 61ff3c3 commit c7cbfd7

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
1-
name: CI for Spring Boot Microservice
1+
name: CI for RandomChat
22

3-
# Trigger workflow on push or pull request to main branch
3+
# Trigger workflow on push/pull request to main branch and manually
44
on:
55
push:
66
branches:
77
- main
88
pull_request:
99
branches:
1010
- main
11+
workflow_dispatch:
12+
inputs:
13+
branch:
14+
description: 'Branch to build'
15+
required: true
16+
default: 'dev'
1117

1218
jobs:
1319
build:
1420
runs-on: ubuntu-latest
15-
1621
steps:
1722
# Step 1: Checkout code
1823
- name: Checkout repository
1924
uses: actions/checkout@v3
25+
with:
26+
# Checkout the branch from input or default
27+
ref: ${{ github.event.inputs.branch || github.ref }}
2028

2129
# Step 2: Set up Java (match your Spring Boot version)
2230
- name: Set up Java 21

0 commit comments

Comments
 (0)