feature/Client connector setup #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ 21 ] | |
name: build | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
- name: Check branch name | |
id: branch-name | |
run: | | |
BRANCH_NAME=${{ github.ref_name }} | |
echo "Branch name: $BRANCH_NAME" | |
if [[ ! "$BRANCH_NAME" =~ ^feature\/[a-z0-9_-]+ ]]; then | |
echo "Error: Branch name does not follow the required pattern 'feature/****'." | |
exit 1 | |
fi | |
- name: Success | |
run: echo "Branch name is valid." | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: ${{matrix.java}} | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml |