September 3, 2026

What Is Github Action – How to Set it Up

Learn what Github Action is and how to set it up with a Spring Boot application, Maven workflow, Super Linter, and multiple operating systems.

TL;DR

  • Github Action lets you automate development workflows based on events such as pushes and pull requests.

  • A workflow is defined in a YAML file and contains the steps to perform when an event occurs.

  • The Java With Maven workflow can automatically build a Spring Boot application.

  • Super Linter can be added as a separate workflow to validate code.

  • Github Action workflows can run in parallel across multiple operating systems using a matrix strategy.

In this tutorial, you will understand Github action and how to set it up.

We would create a simple Spring Boot application locally, build it and push it to Github. Then we would create a Github action that triggers the build anytime a push is made to the repository.

Next, will show you how to use Super Linter to validate your code using Github actions.

Lets follow the steps

  1. Create a SpringBoot Application and Push to Github
  2. Setup Java CI With Maven Workflow
  3. Github Action with Super Linter Workflow
  4. Multiple Operating Systems

 

1. Create a Spring Application and Push to Github

Step 1 – Create a new Spring Boot application.

Step 2 – In the terminal, run the command

mvn clean install

And make sure the application builds successfully.

Step 3 – Create a new Github repository and push the code to the repository.

 

2. Setup Java CI With Maven Workflow

What we would like to do is to setup GitHub actions. An action is a collection of Workflow where a workflow is a definition of the steps to perform when a given event occurs. A workflow is defined in a YAML file. But you don’t need to write this from the scratch. There’s already tons of pre-written workflows you can choose from and with very little adjustment, you can get it to give the desired result.

Follow the steps below:

Step 1 – Open your code repository in Github and click on the Actions tab as shown below

Github Actions tab
Github Actions tab

 

Step 2 – In the list of Worflows, find “Java With Maven” as shown below ( you can also search using the search field). This workflow contains the template for building Java projects with Maven.

Java With Maven Workflow

 

Step 3 – Click on Configure. This would display the workflow configuration file in yml. We could actually edit this file later. But for now it’s fine. Notice the structure of the file. The event that triggers the workflow is specified in the on: section. (I explain the rest in the video). In this case, the workflow would trigger on:

  • push
  • pull request

Step 4 – Click on the Start Commit button to commit this file. Note that a workflow file is actually placed inside your repository in a special directory – .github/worflows/<file.yml>. In our case, it is maven.yml.

Step 5 – Now go back to your IDE. First do a pull to update your local repository. Then make some changes and push back to Github. You will notice that the workflow triggers and the build is run.

 

3. Github Action Using Super Linter Workflow

Super Linter is a tool that you can use to check your code to make sure it is syntactically correct. Note that you can add multiple workflows. Now we would add the Super Linter workflow as a second workflow. Follow the steps

Step 1 – Go to Action and click on New Workflow.

Step 2 – Search for Super Linter.

Step 3– Follow the same procedure to add the Super Linter workflow. Notice that once you commit, it triggers the existing workflow as well.

Step 4 – Test out this workflow by pushing code with bug and see that it fails with a red mark.

 

4. Github Actions in Parallel on different OS

If you notice, you see that the basic maven.yml file has as workflow that runs the build on ubuntu-latest. You can also adjust this to allow the build to run on multiple operating sytems in parallel.

To do that, adjust the runs on section of the workflow file to include three operating systems like so;

    runs-on: ${{matrix.os}}
    strategy: 
      matrix:
        os: [ubuntu-latest, windows-latest, macOS-latest]

 

Once you do this, you can go ahead to modify your code in the IDE and push, you will notice that the three runs in parallel.

FAQs

What is Github Action?

Github Action is a way to automate development workflows in a GitHub repository. Workflows can be triggered by events such as pushes and pull requests.

What is a Github Action workflow?

A workflow is a YAML file that defines the steps to perform when a specific event occurs. Workflow files are stored in the .github/workflows directory.

How do I set up Github Action for a Spring Boot application?

Create and push your Spring Boot application to GitHub, open the repository’s Actions tab, select the Java With Maven workflow, configure it, and commit the workflow file.

What is Super Linter in Github Action?

Super Linter is a workflow that checks code to help identify syntax and formatting problems. It can be added as a separate workflow alongside the Maven build workflow.

Can Github Action run on multiple operating systems?

Yes. A workflow can use a matrix strategy to run the same build across operating systems such as Ubuntu, Windows, and macOS in parallel.

Final Thoughts

Github Action provides a simple way to automate common software development tasks directly from a GitHub repository. With a workflow, you can automatically build your Spring Boot application whenever code is pushed or a pull request is created.

You can also add workflows such as Super Linter to validate your code and configure builds to run across multiple operating systems. These capabilities make Github Action useful for automating builds, testing, and code quality checks as part of your development workflow.

Video tutorial on Working With Github Actions

Kindson Munonye

Kindson Munonye is a software engineer and technical author covering machine learning, statistics, REST APIs, Python, and software engineering. He publishes free tutorials on The Genius Blog and live classes on Alkademy. GitHub · LinkedIn · About · Alkademy

View all posts by Kindson Munonye →
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted