Skip to content

Docker Image CI

Docker Image CI #5

Workflow file for this run

name: Docker Image CI
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Source Code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Build Application
run: mvn -Pjar clean package
- name: Docker Login
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag fortifydocker/iwa-java:latest
- name: Push Docker image
run: docker push --all-tags fortifydocker/iwa-java