Skip to content

teheidoma/spring-boot-image-build-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Image Build Action

Spring Boot Image Build Action

This action builds your Spring application using 'bootBuildImage' and publishes it.

Inputs

  • jdk_dist (required): JDK distribution. Default is '22-graal'.
  • registry_username: Registry username.
  • registry_password: Registry password.
  • registry_hostname: Registry hostname. Default is 'docker.io'.
  • include_commit_sha: Include commit SHA to image tag. Default is 'false'.

Outputs

  • tag: Image name.
  • image_tag: Image tag.

Example Usage

name: Build and Publish Spring Boot Image

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Build Spring Boot Image
        id: build
        uses: teheidoma/[email protected]
        with:
          jdk_dist: '17.0.10-graal'
          registry_username: ${{ secrets.REGISTRY_USERNAME }}
          registry_password: ${{ secrets.REGISTRY_PASSWORD }}
          registry_hostname: 'docker.io'
          include_commit_sha: 'true'
      - name: Upload Image to Registry
        run: echo "Upload image ${{ steps.build.outputs.tag }}:${{ steps.build.outputs.image_tag }} to registry."