Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 1.33 KB

README.md

File metadata and controls

46 lines (36 loc) · 1.33 KB

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."