Create a simple micronaut project and github actions workflow.
Create a Micronaut poject using the Micronaut Launch tool to generate your project: Micronaut Launch tool
To create a github action:
- Create a new repository for the sample micronaut project.
- Go to the
actionsof the repository, click on theset up a workflow yourself ->link below theGet started with Github Actionsheader. - A new tab opens with a
.github/workflows/main.yml, you can rename the.yml. - Enter the below script to create a github action:
name: github-actions-cicd-demo
on:
push:
branches:
- '*'
jobs:
build-job:
name: Build Job
runs-on: ubuntu-latest
steps:
- name: 'Start Build Job'
run: |
echo "Starting the build job."
- Add and commit the sample project to the repository using git commands:
$ git add . && git commit -m "Initial Commit" && git push -u origin main
The below screenshot is the result of creating the Github Actions: