Skip to content

Merge branch 'master' of https://github.com/ximanta/demo-action-workflow #11

Merge branch 'master' of https://github.com/ximanta/demo-action-workflow

Merge branch 'master' of https://github.com/ximanta/demo-action-workflow #11

Workflow file for this run

name: Build and Test
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: "17"
distribution: temurin
- name: Test
run: mvn --batch-mode --update-snapshots test
- name: Package
run: mvn package
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: simanta
password: Projects@2015
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: simanta/githubcicd
# - name: Publish
# uses: docker/build-push-action@v2
# with:
# username: ximanta.sarma@gmail.com
# password: Projects@2015
# repository: simanta/githubcicd
# tags: ${{github.run_number}}