Skip to content

Add another dockerfile with new CI for github actions #6

Add another dockerfile with new CI for github actions

Add another dockerfile with new CI for github actions #6

Workflow file for this run

name: Java CI with Maven
on:
push:
branches: ["another-feature"]
pull_request:
branches: ["another-feature"]
permissions:
contents: read
checks: write
id-token: write
jobs:
test:
name: Build and Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check out code
- name: Set up Maven
uses: actions/setup-maven@v1
with:
java-version: 17
- name: Run tests
run: mvn test
- name: Generate report
uses: mikepenz/action-junit-report@v4
with:
report-path: target/surefire-reports
generate-html-report: true
build-and-push-docker-image:
needs: test
runs-on: ubuntu-latest
steps:
- name: Set up Maven
uses: actions/setup-maven@v1
with:
java-version: 17
- name: Build Docker image
run: mvn spring-boot:build-image -Ddockerfile=Dockerfile.layers -DskipTests
outputs:

Check failure on line 47 in .github/workflows/CI.yml

View workflow run for this annotation

GitHub Actions / Java CI with Maven

Invalid workflow file

The workflow is not valid. .github/workflows/CI.yml (Line: 47, Col: 7): Unexpected value 'outputs'
image-name: echo "${{ steps.build-image.outputs.image-id }}"
repository-name: echo "${{ steps.build-image.outputs.image-name }}"
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push Docker image
run: docker push ${{ secrets.DOCKER_USERNAME }}/${{ steps.build-image.outputs.repository-name }}:${{ steps.build-image.outputs.image-tag }}