fix application.yaml file name #40
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 with Maven | |
on: | |
push: | |
branches: [ "main", "develop" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: maven | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build with Maven, package as OCI Image with CNB | |
env: | |
DOCKER_IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
run: | | |
mvn spring-boot:build-image \ | |
-Dspring-boot.build-image.imageName=${DOCKER_IMAGE}:${{ github.sha }} \ | |
-Dspring-boot.build-image.publish=false | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Tag latest | |
if: github.ref == 'refs/heads/main' | |
env: | |
DOCKER_IMAGE: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
run: | | |
docker tag ${DOCKER_IMAGE}:${{ github.sha }} ${DOCKER_IMAGE}:latest | |
docker push ${DOCKER_IMAGE}:latest | |
- name: Chart | Push | |
uses: appany/[email protected] | |
with: | |
name: mongodb-probe-chart | |
repository: ${DOCKER_IMAGE}-chart | |
tag: 0.0.1 | |
path: chart/mongodb-probe # Default charts/{name} | |
registry: ${{ env.REGISTRY }} | |
registry_username: ${{ github.actor }} | |
registry_password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Package | |
path: | | |
target/*.jar | |