Update docker-image.yml #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI Publish Docker Image | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get the tag name | |
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build a container image from our Spring Boot app using Paketo.io / Cloud Native Build Packs | |
run: mvn spring-boot:build-image -Dspring-boot.build-image.imageName=${{ env.REGISTRY }}/sevkohler/eos:latest | |
- name: Publish to GitHub Container Registry | |
run: docker push ${{ env.REGISTRY }}/sevkohler/eos:latest |