Creating a GitHub Actions workflow
In this section, we will create a workflow that will build a Spring Boot Java application with GitHub Actions. This workflow will build a Spring Boot application using the mvn clean install
Maven build tool command. The following is an example of a workflow file of building a Java project with Maven:
name: Build Java project with Maven on: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install and Setup Java 16 uses: AdoptOpenJDK/install-jdk@v1 with: version: '16' architecture: x64 ...