Skip to content

Merge branch 'main' of https://github.com/nikosnikolaidis/master-test #8

Merge branch 'main' of https://github.com/nikosnikolaidis/master-test

Merge branch 'main' of https://github.com/nikosnikolaidis/master-test #8

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Build the Docker image
run: |
echo ${{ secrets.DOCKER_TOKEN }} | docker login -u nikosnikolaidis --password-stdin
docker build . --file Dockerfile --tag nikosnikolaidis/master-cicd-service:$(date +'%Y-%m-%d')
docker push nikosnikolaidis/master-cicd-service:$(date +'%Y-%m-%d')